ASP.NET GridView with Merged Cells - Exported Excel version not showing merged cells

Hello,

I have a ASP.Net GridView with some merged headers. The GridView is all ready and no further formatting is needed. I am using XlsIO control to export this GridView to excel successfully using ImportGridView method and keeping the source style. But when I open my excel file, the Merged cells are not merged anymore. What is it that I am missing here? 

ExcelEngine ExcelEngineObject = new Syncfusion.XlsIO.ExcelEngine();
IApplication Application = ExcelEngineObject.Excel;
Application.DefaultVersion = ExcelVersion.Excel2013;
IWorkbook Workbook = Application.Workbooks.Create(1);
Worksheet.ImportGridView(grdBothPivot, 1, 1, true, true);
Workbook.SaveAs("CustomReport.xlsx", Response, ExcelDownloadType.Open);
Workbook.Close();
ExcelEngineObject.Dispose();

1 Reply

SK Shamini Kiruba Sobers Syncfusion Team May 20, 2020 01:32 PM UTC

Hi Sohail, 

Greetings from Syncfusion. 

Sorry, we don’t have support for preserving merged cells when imported from GridView and we are not having any immediate plans to implement this. 

Regards, 
Shamini 


Loader.
Up arrow icon