Unplanned
Last Updated: 11 Jun 2020 13:37 by ADMIN
Theo
Created on: 11 Jun 2020 13:37
Category: UI for WinForms
Type: Bug Report
1
RadGridView: GridViewSpreadExport.FileExportMode is not respected when exporting to a stream

If you have two RadGridView controls and you want to export both of the grids to a common file on two different sheets, it is suitable to use FileExportMode.NewSheetInExistingFile. However, when using the export overload to a stream doesn't respect the ExportMode.

Workaround: use exporting to a file:

            string exportFile = @"..\..\exportedData.xlsx";
            GridViewSpreadStreamExport spreadStreamExport = new GridViewSpreadStreamExport(this.radGridView1);
            spreadStreamExport.FileExportMode = FileExportMode.NewSheetInExistingFile;
            spreadStreamExport.ExportVisualSettings = false;
            spreadStreamExport.RunExport(exportFile, new SpreadStreamExportRenderer());

 

0 comments