This project is read-only.

DefaultRowHeightInPoints not working?

Aug 25, 2009 at 4:47 PM
Edited Aug 25, 2009 at 4:48 PM

First of all thank you for your excellent work on NPOI! It is great to have a clean way to create XLS files!

I ran into a problem with HSSFSheet.DefaultRowHeightInPoints. As I understand this would set the row height for all rows in a sheet that does not have an explicit height set. If I set it to for example 15, create the xls file, open it in excel, right click any row and select "Row height..." it seems it is always 12.75 regardless of what I set DefaultRowHeightInPoints to.

Example code to reproduce the problem:

    Dim workbook = New HSSFWorkbook
    Dim sheet = workbook.CreateSheet()
    sheet.DefaultRowHeightInPoints = 15
    Dim row0 = sheet.CreateRow(0)
    Dim cell0 = row0.CreateCell(0)
    cell0.SetCellValue("HELLO WORLD!!!!!")

    Dim ms As New MemoryStream()
    IO.File.WriteAllBytes("C:\Test11.xls", ms.ToArray())

Aug 29, 2009 at 11:30 AM

Thank you for your feedback. This issue is confirmed as a bug and will be fixed in the next release (1.2.2).

Aug 29, 2009 at 11:33 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.