I'm looking at HSSFSheet#autoSizeColumn and there is a check
preventing such exceptions:
public void autoSizeColumn(int column, boolean useMergedCells) {
double width = SheetUtil.getColumnWidth(this, column, useMergedCells);
if (width != -1) {
width *= 256;
int maxColumnWidth = 255*256; // The maximum column width
for an individual cell is 255 characters
if (width > maxColumnWidth) {
width = maxColumnWidth;
}
setColumnWidth(column, (int)(width));
}
}
I'm pretty sure you are using an older version of POI. Please check
your classpath. If the problem is still there, please post sample
code that demonstrates the bug.
Yegor
On Fri, Sep 2, 2011 at 3:38 PM, Ian <[email protected]> wrote:
>
> This error was generated using version 3.8 beta4
>
>
> Yegor Kozlov <yegor.kozlov <at> dinom.ru> writes:
>
>>
>> which version of POI? Please try with the latest 3.8-beta4, there have
>> been improvements in column autosizing recently.
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]