-
Bug
-
Resolution: Fixed
-
Normal
-
5.12.2
-
None
-
Security Level: Jimmy
-
None
Steps to Reproduce
1. import keikai-662.xlsx
2. export it in xlsx format
3. open the file with Excel
Current Result
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><logFileName>Repair Result to keikai-662-export0.xml</logFileName><summary>Errors were detected in file '/Users/hawk/Downloads/keikai-662-export.xlsx'</summary><repairedRecords summary="Following is a list of repairs:"><repairedRecord>Repaired Records: Table from /xl/tables/table1.xml part (Table)</repairedRecord></repairedRecords></recoveryLog>
Expected Result
no alert
Debug Information
- keikai trims String tbColName = tbCol.getName().trim(); a table header for
KEIKAI-550, but Excel checks consistency between a table header and its display value in sharedStrings.xml. Since these 2 values don't match each other, Excel shows an alert.
If you check the exported file > sharedStrings.xml, it contains a tailing space:<si><t xml:space="preserve">Has Space at the End </t></si>
But the text in table header doesn't have the tailing space, this mismatch causes an Excel alert.
- verification
protected void exportCell(Row poiRow, SCell cell) { ... case STRING: poiCell.setCellType(Cell.CELL_TYPE_STRING); if(cell.isRichTextValue()) { ... } else { poiCell.setCellValue(cell.getStringValue().trim()); } break; ..
If I trim the cell string value, too, Excel can open the exported file without the alert.
Workaround
- remove the tailing space character in the table header
- relates to
-
KEIKAI-550 the exported file with a table contains a format problem
- Closed