Completed
Last Updated: 01 Nov 2019 08:11 by ADMIN
Release LIB 2019.3.1104 (10/07/2019)
Kirill
Created on: 27 Sep 2019 16:13
Category: Spreadsheet
Type: Bug Report
1
Spreadsheet: ArgumentOutOfRangeException is thrown while rendering a worksheet with hidden column whose cells have wrapping

The issue is a regression introduced in R3 2019. When the cells in a hidden column are with IsWrapped=true, an ArgumentOutOfRangeException is thrown during the text measuring. The behavior is related to SpreadProcessing as well.

Workaround: Remove the wrapping from the hidden cells:

 

var usedCellRange = workbook.ActiveWorksheet.GetUsedCellRange(new IPropertyDefinition[] { CellPropertyDefinitions.IsWrappedProperty});

for (int row = usedCellRange.FromIndex.RowIndex; row <= usedCellRange.ToIndex.RowIndex; row++)
{
    for (int column = usedCellRange.FromIndex.ColumnIndex; column <= usedCellRange.ToIndex.ColumnIndex; column++)
    {
        if (workbook.ActiveWorksheet.Columns[column].GetHidden().Value)
        {
            workbook.ActiveWorksheet.Cells[row, column].SetIsWrapped(false);
        }
    }
}

 

0 comments