TruTruMaster opened a new pull request, #1603:
URL: https://github.com/apache/poi/pull/1603

   `cloneTables` copied each table's autoFilter with 
`setAutoFilter(table.getCTTable().getAutoFilter())`. For a table without an 
autoFilter, which is what `XSSFSheet.createTable` gives, that is `null`, and 
XMLBeans writes it as:
   
   ```xml
   <table id="2" ... 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><autoFilter 
xsi:nil="true"/>...
   ```
   
   The schema doesn't allow it. The Open XML SDK validator reports `The 
'http://www.w3.org/2001/XMLSchema-instance:nil' attribute is not declared` for 
`/xl/tables/table2.xml`, while the source table validates. The autoFilter is 
now copied only when the source table has one.
   
   **Test:** `TestXSSFTable.testCloneTableKeepsAutoFilterOnlyIfSet` clones a 
sheet with a table without an autoFilter and one with an autoFilter, writes it 
and reads it back. The first must have no autoFilter, and the second must keep 
its `ref`. It fails on trunk (`table without an autoFilter ==> expected: 
<false> but was: <true>`). All 2357 `org.apache.poi.xssf` tests pass.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to