You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2013/08/13 21:23:38 UTC

[Bug 52233] IndexOutOfBoundsException when calling sheet.getColumnWidth after calling XSSFWorkbook.write

https://issues.apache.org/bugzilla/show_bug.cgi?id=52233

--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
Analysis:
Class ColumnHelper has a member worksheet of type CTWorksheetImpl. If I look at
it before and after the call to write(), there is a line "  <main:cols/>"
missing after writing, so it seems writing is removing this line somehow.

When looking more closely the onSave() call in XSSFWorkbook.write() invokes
XSSFSheet.write(), which causes the removal via 

                worksheet.setColsArray(null);

I am not sure why the setColsArray() is done here and if not doing this would
have side-effects, but it would solve the problem here and probably some others
that are reported in some other Bugs when users try using a Workbook after
writing it out once.

-- 
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