This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes excel sheet data insertion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "excel sheet data insertion" Watch "excel sheet data insertion" New topic

excel sheet data insertion

premchand Singh

Joined: Mar 12, 2012
Posts: 28
I am trying to insert data from the excel sheet file to the data base through java program..
the rpgram is running and the connection is also being established.........
The code is as follows:

but the following error i am getting while running the program.. Invalid header signature; read 43016997712, expected -2226271756974174256

Can anybody please help me.....

Thanks in advance:
Rob Spoor

Joined: Oct 27, 2005
Posts: 19649

The Apache POI classes you're using only support files created from Excel 2003 and before (*.xsl). For files created by Excel 2007 and later (*.xslx) you need to use XSSFCell, XSSFRow, XSSFSheet and XSSFWorkbook. If that's not the problem then your file has become corrupted while uploading / copying / ...

How To Ask Questions How To Answer Questions
It is sorta covered in the JavaRanch Style Guide.
subject: excel sheet data insertion
Similar Threads
Java Code to export data to Excel
Read Excel Sheet Using Java
Read Excel values and store in to Database
How to read xls, xlsx and open office excel formats from java. Any pointers ? Kindly help.
A little help