Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Inserting data into Mysql from excel files using jdbc

 
nick sharma
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
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate 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.
 
Scott Selikoff
author
Saloon Keeper
Posts: 4028
18
Eclipse IDE Flex Google Web Toolkit
  • 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