aspose file tools*
The moose likes JDBC and the fly likes how to fetch data from excel sheet and dump to Mysql database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "how to fetch data from excel sheet and dump to Mysql database" Watch "how to fetch data from excel sheet and dump to Mysql database" New topic
Author

how to fetch data from excel sheet and dump to Mysql database

sandy indira
Greenhorn

Joined: Feb 03, 2010
Posts: 13
how to fetch data from excel sheet and dump to Mysql database..

i had written code to fetch the data from the excel sheet using excel api (POI HSSF) given by Apache.

and i am able to display it on the console

but how to dump it to the database is the real issue...

Help guys help...


Thanks in advance...
Saifuddin Merchant
Ranch Hand

Joined: Feb 08, 2009
Posts: 605

Connect to the database using JDBC and just use some insert queries to dump the data. Ummm...why is this a servlet problem?

P.S - There might be a better way to just import the data in Mysql..


Cheers - Sam.
Twisters - The new age Java Quiz || My Blog
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41800
    
  62
Do you know how to use JDBC (the standard Java API for accessing databases)? If yes, what particular issue do you have with inserting the data? If not, start here: http://java.sun.com/docs/books/tutorial/jdbc/index.html


Ping & DNS - my free Android networking tools app
sandy indira
Greenhorn

Joined: Feb 03, 2010
Posts: 13
actually from a excel sheet the data is fetched from cells(i.e all the data is fetched from rows).. then how to dump the data in mysql database where we put data in columns..

i have nerver done this kind of stuff b4... so if anyone can suggest how the whole loop should be like..
i. how my "for loop" should be..in my case i am taking the username and password from the excel sheet and have to dump this in the
user name and password of the sql database..

any suggestions wil be greatly appreciated...
sandy indira
Greenhorn

Joined: Feb 03, 2010
Posts: 13
thank you guys 4 help..


i had some changes in it and now its working...
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5827
    
    7

"sandy the developer", please see your private messages for an important administrative matter.


JBoss In Action
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5827
    
    7

guys 4 help.

of stuff b4

Please use full words, not "text speak": http://faq.javaranch.com/java/UseRealWords
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to fetch data from excel sheet and dump to Mysql database