Author
how to fetch data from excel sheet and dump to Mysql database
sandy indira
Greenhorn
Joined: Feb 03, 2010
Posts: 13
posted Feb 11, 2010 04:19:44
0
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: 576
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: 35230
posted Feb 11, 2010 04:26:29
0
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
Android apps – ImageJ plugins – Java web charts
sandy indira
Greenhorn
Joined: Feb 03, 2010
Posts: 13
posted Feb 11, 2010 21:05:42
0
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
posted Feb 11, 2010 23:05:47
0
thank you guys 4 help..
i had some changes in it and now its working...
Peter Johnson
author
Bartender
Joined: May 14, 2008
Posts: 5533
posted Feb 13, 2010 09:25:03
0
"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: 5533
posted Feb 13, 2010 09:28:36
0
guys 4 help.
of stuff b4
Please use full words, not "text speak": http://faq.javaranch.com/java/UseRealWords
subject: how to fetch data from excel sheet and dump to Mysql database