Completed
Last Updated: 13 Apr 2022 06:31 by ADMIN
Release R2 2022
Amit
Created on: 30 Mar 2022 10:48
Category: PivotGrid
Type: Bug Report
0
RadPivotGrid: PivotGridSpreadExport jumps to the second sheet starting from line number SheetMaxRows

My pivot grid data size is 90,388 rows, and I export data to xlsx format with SheetName = "data".

The output file generated in this case (correctly) has 65536 rows on sheet "data" and the remaining 24852 rows on the sheet "data_2" (since SheetMaxRows = 65536 and total rows > SheetMaxRows, second sheet "data_2" is added automatically).

But the rows on the sheet "data_2" are written starting from line number 65538. The data on sheet "data_2" starts on line 65538 and goes till line 90389.

Expected:

Actual:

 

Workaround; use the following custom renderer:

        public class MyRenderer : SpreadExportRenderer
        {
            public override void CreateCellSelection(int rowIndex, int columnIndex)
            {
                if (rowIndex > (int)Telerik.WinControls.UI.Export.ExcelMaxRows._65536)
                {
                    rowIndex = rowIndex % (int)Telerik.WinControls.UI.Export.ExcelMaxRows._65536 - 1;
                }
                else
                {
                    rowIndex = rowIndex % (int)Telerik.WinControls.UI.Export.ExcelMaxRows._65536;
                }
                base.CreateCellSelection(rowIndex, columnIndex);
            }
        }

0 comments