• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

import excel data into mysql database?

 
saravanan rajendran
Ranch Hand
Posts: 75
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I am hardly trying to import excel data into mysql database using servlet.
My first doubt is it possible to do it java.how?
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wrong tool. If you save it as a tab-delimited file, you can force feed the data into MySql tables.
 
saravanan rajendran
Ranch Hand
Posts: 75
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, thanks for yr replay.my excel sheet contain name,dob,age values i want to insert those value into mysql database in particular table how possible?
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) create table
2) save as tab-delimited file
3) import data
 
saravanan rajendran
Ranch Hand
Posts: 75
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, thanks for yr replay i have jsp page that contain browser button when i pressed that button particular excel file is selected and i have import button when i pressed that all values have to store particular table in mysql database.how to do please help me
 
Paul Clapham
Sheriff
Pie
Posts: 20174
25
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The word is "reply", not "replay".

Your problem is far from clear. Are you selecting this file from the client? If so, you will need to upload it to your server. That isn't a JDBC problem, but file uploading has been discussed many times in the Servlets and JSP forum.

Next, if these are really Excel files and you can't get tab-delimited or comma-delimited files, you'll need some code that can read them successfully. Apache POI or JExcel are two possibilities. Likewise this isn't anything to do with JDBC.

Finally, once you get the data out of the Excel format you will have to write it into your database. This requires understanding the data that is being transferred, including how it is stored in the Excel file and what tables and columns it must be put into in the database.

So yes, it's possible to do that in a servlet.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic