poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 56274] SXSSF produces corrupt xlsx file from valid xlsx template
Date Wed, 19 Mar 2014 09:26:59 GMT

--- Comment #1 from Yaniv Kunda <yaniv@kundas.net> ---
Created attachment 31403
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31403&action=edit
Patch for fixing the bug

I've located the bug XSSFTable.updateHeaders(), where the xmlFragment id is
used as a cellnum - which will only be the same in the special case of adding
columns to a sheet one by one, in order; inserting/moving columns will create
xmlFragment ids not consistent with cell numbers.

I have fixed it by using a counter (starting from firstHeaderColumn) that
advances along the table columns, and then used to fetch sheet cells by their
actual cellnum.

The additional minor optimizations are not related, but I deemed them
appropriate while reviewing XSSFTable - if a commiter wishes to discard them
for the purpose of fixing this bug, then only the changes in the
updateHeaders() method should be included.

You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

View raw message