Hello,
I am using POI API to read an excel file that I have previously written using Java, but not using POI (I've written the file using Microsoft office xml and then writing it using FileOutputStream with an xls extension).
The problem is that when I read back the file I am getting this error:
The system was unable to upload the file: Invalid header signature; read 7311066695147732796, expected -2226271756974174256.
which means that the header of the file is not excel typed.
If I manually open the file and save it as excel POI is able to read it but I don't want to do this as this entire process of writing/reading the file should be automated. I don't want to use POI for writing the file because POI cannot provide me everything that I need when Microsoft office xml can.
So, my question is simple: Is there a way, using java, to set the header of a file to excel so that POI will recognize it as such?