Monday, 26 August 2013

Apache POI autoSizeColumn() is not working

Apache POI autoSizeColumn() is not working

I've created an excel sheet using apache poi library and tried so much to
change column width with respect to the content length by using
autoSizeColumn() method, but no luck. I've used poi 2.5.1 and jdk 1.6.
This is my code segment.
for (int columnIndex = 0; columnIndex < 8; columnIndex++) {
sheet.autoSizeColumn(columnIndex);
}
I've used this code segment after inserting data to the excel sheet. The
error message said that "cannot find symbol"
Any help would be appreciated.
Thanks in advance.

No comments:

Post a Comment