Unplanned
Last Updated: 14 Oct 2022 11:53 by Carlos
Carlos
Created on: 14 Oct 2022 11:53
Category: SpreadProcessing
Type: Bug Report
0
SpreadProcessing: Incorrect height when row height is missing and a cell has wrapped multiline text

Parsing a document that contains a cell with wrapped multiline text and its row doesn't define a value for height, results in wrong row height when rendering or exporting to PDF.

Workaround: Fit the height of the row when it contains wrapped cells:

 

Worksheet worksheet = workbook.ActiveWorksheet;
CellRange wrappedCells = worksheet.GetUsedCellRange(CellPropertyDefinitions.IsWrappedProperty);

for (int i = wrappedCells.FromIndex.RowIndex; i < wrappedCells.ToIndex.RowIndex; i++)
{
    worksheet.Rows[i].AutoFitHeight();
}

 

0 comments