This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
sandy indira
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 607
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
sandy indira
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you guys 4 help..


i had some changes in it and now its working...
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"sandy the developer", please see your private messages for an important administrative matter.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
guys 4 help.

of stuff b4

Please use full words, not "text speak": http://faq.javaranch.com/java/UseRealWords
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic