You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Al Shvw <fl...@gmail.com> on 2009/04/10 17:11:57 UTC

excel row autofit command

I need to resize rows height in Excel to be large enough to handle the
biggest cell of data.

In Excel I should set "wrap text" and execute "Format/Row/Auto Fit
Selection"

Is there API function equivilent to Excel's "Format/Row/Auto Fit Selection"?

If there is no such command, then another question:

I guess that if you do not explicitly set a row's size, Excel will re-size
it on load if any of the cells in the row are set to auto-wrap. How can I
remove this flag that row's size was explicitly set?

I can set default row height with a command : hSSFRow.setHeight(0xff) but
this doesn't work. Row's height become default, but Excel consider this
height as explicitly set and don't resize it.