This project has moved and is read-only. For the latest updates, please go here.

Row height issue

Feb 9, 2012 at 1:04 AM


I'm seeing an odd behavior with setting of row height.  After running the code below, all the rows in the worksheets are set at variable heights as though the AdjustToContents function was run on them.  Column M contains varying amounts of text and is what forces the variable row heights if there is no explicit row height setting.  If I remove the last line of code (attempts to set headings row to height 30), all row heights are 15, as expected.  If I'm doing something wrong or if there is a workaround, I'd appreciate knowing about it.


                foreach (ClosedXML.Excel.IXLWorksheet ws in wb.Worksheets)
                    ClosedXML.Excel.IXLRows wsRows = ws.RowsUsed();
                    wsRows.Height = 15;
                    ClosedXML.Excel.IXLTables wsTables = ws.Tables;
                    ws.Columns("M").Width = 40; //Brief description
                    ws.Row(1).Height = 30;

Feb 9, 2012 at 3:09 AM

Please create an issue and attach a file that can reproduce this behavior.

Feb 9, 2012 at 6:36 PM

Ok, I have created an issue 7712 that includes code that reproduces the behavior.


Feb 10, 2012 at 5:23 AM

Pick up the latest source code.

I have no idea how nobody encountered this issue before.


Feb 10, 2012 at 7:48 PM

Thanks very much for the rapid support on this issue.  The new source code solved the problem.