Please find two Excel files attached: biotics_good.xls and biotics_bad.xls.
They contain the same data set but the binaries are different.  POI HSSF can
read the biotics_good.xls file, but generates the following IOException when
reading biotics_bad.xls:
java.io.IOException: Invalid header signature; read 8387989908914269500,
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 saved the biotics_bad.xls file from a Java application that uses a
URLConnection to download the file from a website.  But I saved the
biotics_good.xls file via Internet Explorer:Save As "xls."

I am able to open biotics_bad.xls and save it an "XLS" file and this newly
saved version of the file can be read by POI.

Does anyone know what's going on here and how to save my XLS from my Java
application into a binary format that POI can understand?

Thanks,
Viva

        --------------------------------------------------
      Viva Chu
      Software Architect and Consultant
      [EMAIL PROTECTED]
      510-895-0517
      --------------------------------------------------




Reply via email to