• Post Reply Bookmark Topic Watch Topic
  • New Topic

POI and excel row autofit command  RSS feed

Alexander Ivanov
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!