Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

import excel data into mysql database?

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) create table
2) save as tab-delimited file
3) import data
 
saravanan rajendran
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 28271
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Liar, liar, pants on fire! refreshing plug:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic