Completed
Last Updated: 31 Jan 2024 11:39 by ADMIN
Release 2024 Q1 (2024.1.130)
Steven
Created on: 10 Nov 2023 16:54
Category: PivotGrid
Type: Feature Request
1
RadPivotGrid: Add option in PivotGridSpreadExport to export to a specified sheet

What I would like is to be able to export to a named sheet and keep the other sheets in file. For example:
"Sheet 1" (with new values), "Sheet2" (with old values)

Using your current naming convention, the Option might be named FileExportMode.CreateOrOverrideSheet

1 comment
ADMIN
Nadya | Tech Support Engineer
Posted on: 10 Nov 2023 17:10

Hello, Steven,

Currently you can achieve similar behavior when creating a custom SpreadExportRenderer. Then use FileExportMode.NewSheetInExistingFile to export the data.

public class MyCustomSpreadExportRenderer : SpreadExportRenderer
{
    public override void ImportWorkbook(Stream stream)
    {
        base.ImportWorkbook(stream);

        var fi = typeof(SpreadExportRenderer).GetField("workbook", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
        Telerik.Windows.Documents.Spreadsheet.Model.Workbook workbook = fi.GetValue(this) as Workbook;
        workbook.Worksheets.Remove("MySummary");
    }
}

Regards,
Nadya
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.