public static void GetActualizedRange(unvell.ReoGrid.Worksheet CW, out int maxRow, out int maxCol) { unvell.ReoGrid.RangePosition ColumnCaptionRange = new unvell.ReoGrid.RangePosition(row: 0, col: 0, rows: 1, cols: CW.ColumnCount); int maxCaptionCol = -1; CW.IterateCells(range: ColumnCaptionRange, iterator: (row, col, cell) => { if (cell.DataFormat == CellDataFormatFlag.Text) { string text = cell.GetData <String> ( ); if (text == null) { return(false); } maxCaptionCol = col; return(true); } if (cell.DataFormat == CellDataFormatFlag.General) { string text = cell.GetData <String> ( ); if (text == null) { return(false); } maxCaptionCol = col; return(true); } return(false); } ); maxCol = maxCaptionCol; unvell.ReoGrid.RangePosition RowCaptionRange = new unvell.ReoGrid.RangePosition(row: 0, col: 0, rows: CW.RowCount, cols: 1); int maxCaptionRow = -1; CW.IterateCells(range: RowCaptionRange, iterator: (row, col, cell) => { if (cell.DataFormat == CellDataFormatFlag.Text) { string text = cell.GetData <String> ( ); if (text == null) { return(false); } maxCaptionRow = row; return(true); } if (cell.DataFormat == CellDataFormatFlag.General) { string text = cell.GetData <String> ( ); if (text == null) { return(false); } maxCaptionRow = row; return(true); } return(false); } ); maxRow = maxCaptionRow; return; }