• 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

Export data from Excel to database using JAVA

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am a beginner in JAVA world. I want to develop a tool using JAVA which exports the data from Excel sheet to database. Can anyone help me by giving advice on where should i start with? and what all i can use in JAVA to make this tool ?
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do a search for 'Java Excel' in Google or your favorite search engine. You'll find several results to get you started. Choose a database, one that you will likely connect to via JDBC, and off you go.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A library like Apache POI or jExcelApi can help with reading the file. Then you can use JDBC to transfer the data to a DB.
 
renu richard
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ULF,
Where can i find Apache POI.jar file. Many Thanks!!
Actually i am trying to read the data from the XML and putting it in spreadsheet. For which i need POI.jar.
 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Doing a little search in google will take you to this web page Apache Poi where you can find the download link. As per your requirement you should parse the XML document using XML parsers(SAX or DOM) and then using the apache POI api, enter the data into Excel.
 
renu richard
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I downloaded poi-bin-3.2-FINAL-20081019.zip file and set it in my classpath.

But, then when i run my java program XMLtoExcel.java, i am getting the below error.
Run in Eclipse:

Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

Compile through command prompt :

javac XMLToExcel.java
Note: XMLToExcel.java uses or overrides a deprecated API.
Note: Recompile with -Xlint eprecation for details.

[ November 17, 2008: Message edited by: renu richard ]
[edit]Disable smilies. CR[/edit]
[ November 17, 2008: Message edited by: Campbell Ritchie ]
reply
    Bookmark Topic Watch Topic
  • New Topic