Thanks for the quick answer.
The Excel generation code is exactly the same. Our excel file has .xslx
extension. I tried with .xls and it's not working either. We are using two
Maven dependencies; poi 3.7 and poi-ooxml 3.7.
The first time I try to generate the spread sheet I get this:
org.apache.poi.POIXMLException: org.apache.poi.POIXMLException:
java.lang.reflect.InvocationTargetException
at
org.apache.poi.POIXMLDocumentPart.createRelationship(POIXMLDocumentPart.java:244)
at
org.apache.poi.POIXMLDocumentPart.createRelationship(POIXMLDocumentPart.java:213)
at
org.apache.poi.xssf.usermodel.XSSFWorkbook.onWorkbookCreate(XSSFWorkbook.java:271)
at
org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:169)
...
The second time, the spread sheet is generated. However, when I try to open
to open it, I have the following message:
Repaired Records: Font from /xl/styles.xml part (Styles)
And all the styles are absent in the spread sheet, though it opens fine.
This file is created on the fly and saved in a temporary folder.
The log says
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recoveryLog
xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
<logFileName>error030240_02.xml</logFileName>
<summary>
Errors were detected in file
'C:\Users\...\Content.IE5\RZOV8ZX4\excelFile.xlsx'
</summary>
<repairedRecords summary="Following is a list of repairs:">
<repairedRecord>
Repaired Records: Font from /xl/styles.xml part (Styles)</repairedRecord>
</repairedRecords>
</recoveryLog>
This file gets created once. Can you, please, explain what are the before
and after xlsx files?
Your help is appreciated. We upgraded to 3.7 since a memory leak issue was
fixed with version 3.6.
Regards.
--
View this message in context:
http://apache-poi.1045710.n5.nabble.com/Problem-creating-an-xlsx-file-using-POI-and-XSSF-tp4506461p4621129.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]