Hi Mirco,
> in a for like this
>
>
>
>
> for (int i = startRow; i <= endRow; i++) {
>
> HSSFRow r = sheet.getRow(i);
>
> System.out.println(r. getHeightInPoints());
>
> }
>
>
>
> I’ve printed the heights of my rows as multiple of DefaultRowHeightInPoints
> (15) NOT what I view on the xls file. Why?
>
> I attach a example of table. I use poi-3.0.2.
>
>
The rows in your sheet are set to the default row height. The actual height is
expanded because columns A and D have Text Wrap turned on and some cells have
text that need to wrap.
HSSFRow will return the value that the Excel file is set to, yours is set to
the default. It is not measuring and guessing the layout with wrapping. To do
so is difficult and might not be consistent across different versions of Excel
like between Mac and Windows or OpenOffice.
If knowing the "Auto-sized" height is important then you could follow the
pattern of autosizing columns in the worksheet class.
Regards,
Dave
>
>
> Thanks a lot for the help
>
> Bye Mirco
>
>
>
> <example.xls>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]