• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

POI and excel row autofit command

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Does this tiny ad smell okay to you?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic