You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by "D. Alvarado" <la...@coolgoose.com> on 2003/01/27 18:04:46 UTC
Too many cell formats
Hi,
I have generated a particularly large Excel document and when
I try to open it, I get the message "Too many cell formats."
Aside from the first row, I want all subsequent rows to have
the same cell style. Currently, I'm making this call to
every cell:
HSSFCellStyle cellStyle = wb.createCellStyle();
cellStyle.setWrapText(true);
cell.setCellStyle(cellStyle);
Is there some way I can set up a default cell style so I
won't always have to invoke this code and thus, might prevent
the "Too many cell formats" error?
Thanks in advance, Dave
Re: Too many cell formats
Posted by Danny Mui <da...@muibros.com>.
Don't create so many cell styles, reuse the same object so POI can
simply point back to it.
http://jakarta.apache.org/poi/faq.html#faq-13
D. Alvarado wrote:
>Hi,
>
>I have generated a particularly large Excel document and when
>I try to open it, I get the message "Too many cell formats."
>Aside from the first row, I want all subsequent rows to have
>the same cell style. Currently, I'm making this call to
>every cell:
>
>HSSFCellStyle cellStyle = wb.createCellStyle();
>cellStyle.setWrapText(true);
>cell.setCellStyle(cellStyle);
>
>Is there some way I can set up a default cell style so I
>won't always have to invoke this code and thus, might prevent
>the "Too many cell formats" error?
>
>Thanks in advance, Dave
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>