Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Uploading xlsx files

807588Mar 17 2009 — edited Mar 20 2009
Hi

Iam trying to read xlsx file from server thru a web allpication,for uploading file iam using POIFSFileSystem from apache.

i.e.POIFSFileSystem poiFs = null;
FileInputStream xlsx = new FileInputStream(urlPath);
poiFs = new POIFSFileSystem(xlsx);

File has got valid data and i could able to read the file successfully with out any exception if my file extn is with xls.
When i run the application with the file extn as xlsx,iam getting the following exception.
java.io.IOException: Invalid header signature; read 1688935826934608, expected -2226271756974174256
at org.apache.poi.poifs.storage.HeaderBlockReader.<init>(HeaderBlockReader.java:124)
at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java:120)

i guess its bug from POi, so pls can anyone suggest me other alternative to read exel file

Thanks in advance.

Edited by: Java_Query.123 on Mar 19, 2009 7:30 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 17 2009
Added on Mar 17 2009
6 comments
617 views