https://bz.apache.org/bugzilla/show_bug.cgi?id=62740
Bug ID: 62740
Summary: XSSFTable constructor automatically assigns invalid
(non-unique) column IDs
Product: POI
Version: 4.0.0-FINAL
Hardware: PC
OS: Mac OS X 10.1
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
By default, XSSFTableColumn IDs have the non-unique value of '1'. This is
interpreted as an invalid table by Microsoft Office Excel.
The somewhat dated 'Create Table' example will reproduce this behavior:
(https://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreateTable.java)
When specifying a table and auto-generating the columns via a cell range, XML
similar to the following is produced (in 'table1.xml):
<?xml version="1.0" encoding="UTF-8"?>
<table id="1" ref="A1:C3" name="Test" displayName="Test_Table"
xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><tableColumns
count="3"><tableColumn id="1" name="Column1"/><tableColumn id="1"
name="Column2"/><tableColumn id="1"
name="Column3"/></tableColumns><tableStyleInfo name="TableStyleMedium2"
showRowStripes="true" showColumnStripes="true"/></table>
As can be seen, by default, all table columns are assigned a non-unique ID.
This behavior seems to stem from newly introduced logic (lines 285-293) in
XSSFTable.java
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]