Meaningless Drivel is fun!*
The moose likes JDBC and the fly likes Inserting data into Mysql from excel files using jdbc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Inserting data into Mysql from excel files using jdbc" Watch "Inserting data into Mysql from excel files using jdbc" New topic
Author

Inserting data into Mysql from excel files using jdbc

nick sharma
Greenhorn

Joined: May 05, 2008
Posts: 28
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

Joined: Apr 14, 2004
Posts: 10336

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.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3700
    
    5

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 ]

My Blog: Down Home Country Coding with Scott Selikoff
 
 
subject: Inserting data into Mysql from excel files using jdbc
 
Similar Threads
opening excel application in browser
Excel File opening
problem when downloading excel sheet from struts application using Internet explorer
How to uplaod excel data into mysql data base in struts..?
importing data from excel to Mysql database using jsp code