Hello, I am generating the Cognos Reports through Java using Cognos API. While generating the reports we set the outputformat to XLWA (Microsoft Excel Web Archive (XLWA) format). The reports generated files have .xls extension. When I try to read this file it gives me the following error: ------------------------------------------------------------------ java.io.IOException: Invalid header signature; read 8243089445407770957, expected -2226271756974174256 at org.apache.poi.poifs.storage.HeaderBlockReader.<init>(HeaderBlockReader.java:112) at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java:151) ------------------------------------------------------------------- If I open and save one of the report files in XLS format. The POI is able to read it correctly. Looks like it is unable to recognize the format. But since these reports are generated in batch mode and in huge number it is practically not possible to open and save all these reports in XLS format. Also, if I try to use SaveAs of MS-Excel, it show the SaveAs file Type to be mthml. I will appreciate if you could give me some pointers on this. Thanks in advance!
IIRC, mhtml = html in a specific format The error tells you that the file isn't in ole2 format, so isn't a "real" excel file If it's html, just process it with a html parser