Hello,
I already found an answer in the Documentation:
https://support.office.com/en-us/article/Excel-specifications-and-limits-16c69c74-3d6a-4aaf-ba35-e6eb276e8eaa
and
*https://poi.apache.org/apidocs/org/apache/poi/xssf/usermodel/XSSFSheet.html#setColumnWidth(int,%20int)
<https://poi.apache.org/apidocs/org/apache/poi/xssf/usermodel/XSSFSheet.html#setColumnWidth(int,%20int)>*
Thank you and have a nice day.
Br,
Adrian
Adrián Schwartzkopf <schwartzkopf.adrian@gmail.com> ezt írta (időpont:
2016. márc. 29., K, 15:29):
>
> Hello,
>
> I actually use Apache POI 3.14 to generate an *SXSSFWorkbook* with
> *SXSSFSheet*.
> I use the sheet.*trackAllColumnsForAutoSizing();* option and the
> *workbook.write(out);* method to write the XLS to an outpustream, but I
> become the following Exception:
>
>
> *Caused by: java.lang.IllegalArgumentException: The maximum column width for an individual
cell is 255 characters.
> at org.apache.poi.xssf.usermodel.XSSFSheet.setColumnWidth(XSSFSheet.java:2386)
> at org.apache.poi.xssf.streaming.SXSSFSheet.setColumnWidth(SXSSFSheet.java:274)*
>
>
>
> As I understand there was a Bug by the HssfSheet regarding this in the older versions
of POI, but it should be fixed: http://apache-poi.1045710.n5.nabble.com/autoSizeColumn-setColumnWidth-passed-255-td4759807.html
>
>
> Have you an idea how can I fix this?
>
>
> Thank you.
>
>
> Br,
>
> Adrian
>
>
>
>
|