• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Inserting data into Mysql from excel files using jdbc

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I recently developed an application using Servlets and JSP. The data for the application is supposed to be updated into Mysql through a batch file or excel file.how do i go about dumping data from excel to mysql using java or are there any tools available for it??

Regards
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can access Excel with JDBC. You'll need to use the JDBC-ODBC bridge though. Other than that, Apache POI is the usual MS file format accessing tool.
 
author
Posts: 4107
28
Google Web Toolkit Eclipse IDE Flex
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want it put into MySQL server (instead of the bridge, which can be slow) you have to write your own JDBC conversion tool to perform the insert. Because Excel is a flat file and databases are generally highly structured, there's no magic tool to dump the file into the database. As Paul mentioned, the Apache POI API is a great tool to use in writing such a conversion tool.
[ July 14, 2008: Message edited by: Scott Selikoff ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!