Hello all,
I had a question regarding an error i am getting.
 
Our project earlier used poi 3.2 and dealt with .xls. Now there is a
requirement to use .xlsx, no need for backward compatibility , so code
should only handle .xlsx files.
 
I got the poi libraries for 3.7.2 and made changes to the code by using XSSF
instead of HSSF at appropriate places. 
 
The readers in the project work fine and are able to read the .xlsx 
correctly.
 
However there is some problems with the writers.
 
The file "....xlsx" is generated , but when it is downloaded Excel gives and
error saying " Excel cannot open the file xyz.xlsx because the file format
or file extension is not valid. Verify that the file has not been corrupted
and that the file extension matches the format of the file."
 
When i change the extension of this file from .xlsx to .xls manually it
opens up fine and also has the data that i am expecting.
 
My question is that is there some part of the code where i need to define
the format for the file which i am missing.
I checked the code and there is no reference to the old hssf library.
 
Could someone please help me in trying to understand what i am doing wrong
which could lead to this error.
 
Thanks

--
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/Excel-not-able-to-open-an-exported-xlsx-file-tp5122864p5122864.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to