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);
}
}
}