Hi,

I'd do the same in the unit test as in the real run.
Unzip and compare both files.
What's the difference?

What is a real run like? is this a web application?
Do you have duplicated POI jars in the classpath?

Andi

On 03.02.20 20:55, Kuro Kurosaka wrote:
> Hi,
> I created an .xlsx file using Apache POI XML (using XSSFWorkbook class).
> The .xlsx file created by a unit test could be opened from Excel but when I
> tried to open the .xlsx file from a real run, Excel won't open it with an
> error message like this in its pop up:
> ----
> Excel cannot open the file 'myfile.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.
> ----
>
> Is there a way to make Excel printout more detailed error message?
> Are there any other debugging tips?
>
> I unzipped the generated .xlsx file and the one that can be opened,
> and I found these files are missing from the one that won't open.
> Do these need to exist?
>
> xl/theme/theme1.xml
> xl/connections.xml
> xl/queryTable/queryTable1.xml
>


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to