version : 3.15.
I try to remove all tableRows by using XWPFTable table.removeRow();
And then, in computeColWidths of class XWPFTableUtil,
Param firstRow(Line 66) was returnd by getFirstRow() and the value was null,
so when the code runs to line 97 and step into getNbColumnsToIgnore(firstRow, true),
it will throw NullPointerException
Beg for someone who knows these apis well and fix this problem,thx!
You can merge this pull request into a Git repository by running:
One of my users found that my initial implementation was lacking a core distinction - most evaluations expect a single result, and "unwrap" 2/3D ValueEval results to a single value based on the input row/column.
However, data validation list formulas explicitly are expected to return a 2D ValueEval. This worked when the formula was simple and evaluated to a single Ptg, but only returned one value when the formula was more complex, or referenced a named range defined as a complex formula.
This change teaches WorkbookEvaluator about the distinction, by way of a new attribute for FormulaType.
There is room for discussion over how it is implemented, but this works for me.
Includes the failing workbook we had as a new unit test.
While I was in FormulaType I went ahead and removed the deprecated, unused, and redundant code marked for removal in 3.17.
Deleting a sheet did not delete table parts and relations. Deleting a table needs to also delete any queryTable relations and parts.
Previous behavior didn't result in documents Excel complained about, but left dead entries in the ZIP structure, which made it bigger and bugged me.
This change does not attempt to delete query connection definitions, as those aren't referenced as relations, and don't have a usage counter to ensure we only delete them if there are no other references. In my samples I had query tables on multiple sheets using the same connection definition, and wanted to delete only one sheet/table but leave others.