is there a way to autofit columns width in excel using jxl.jar library in java?
I'm exporting a JTable into a .xls file but the columns don't fit their cells' contents, and I don't know how to set the autofit option. The closest method that I could find is setShrinkToFit()
but I don't want to shrink the cells' contents, neither to set manually the AutoFit Column Width option in Excel every time I create a new one.
Asked
Active
Viewed 8,939 times
1

Tetsujin no Oni
- 7,300
- 2
- 29
- 46

Andrei Bordeanu
- 67
- 1
- 3
- 12
-
1You can read the answer to this other [question][1] Regards [1]: http://stackoverflow.com/questions/1665391/jxl-cell-formating – Jean-Charles Feb 29 '12 at 15:22
-
I found another [topic](http://stackoverflow.com/questions/1665391/jxl-cell-formating) in StackoverFlow that might answer your question. You can use CellView autosize method. – moon4e Jun 28 '12 at 12:19