I'm using Apache POI 3.7 with Spring MVC 3.1.
How to set excel default row height in apache POI?
I've tried sheet.setDefaultRowHeight((short) 100)
and sheet.setDefaultRowHeightInPoints(100)
but that doesn't work.
Any suggestion for this problem?
Thank you.
row. setHeightInPoints((2 * sheet. getDefaultRowHeightInPoints())); to set it (for example) to 2 characters high.
The Apache POI library supports both . xls and . xlsx files and is a more complex library than other Java libraries for working with Excel files.
HSSF is the POI Project's pure Java implementation of the Excel '97(-2007) file format. XSSF is the POI Project's pure Java implementation of the Excel 2007 OOXML (. xlsx) file format. HSSF and XSSF provides ways to read spreadsheets create, modify, read and write XLS spreadsheets.
I use
row.setHeightInPoints((2 * sheet.getDefaultRowHeightInPoints()));
to set it (for example) to 2 characters high.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With