I am getting the same exact error. Only I am getting it trying to convert from a web grid, not a windows grid. I am also using your exact example on your website on how to go about exporting. The only difference in the code below is I have changed the name of the grid on my web page to "grdDefault". This is C# code. I have about one hour remaining today before I am expected to present my findings on should we dump Infragistics libraries and completely migrate our code to Syncfusion's. This is the only thing holding up my ability to finish my proposal. It would be wonderful if I could get a reply on this today, not only for the company I work for but also for Syncfusion. Now is your time time shine, given the problems we've been having with Infragistics. You need to shine all the way in order for me to convince the powers that be that we should migrate to Syncfusion. Thanks, Perry
GroupingGridExcelConverterControl ggExcelConverter = new GroupingGridExcelConverterControl();
// ExcelEngine provides access to XLSIO application interface
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
// Excel workbook
IWorkbook myWorkbook = excelEngine.Excel.Workbooks.Add();
IWorksheet mySheet1 = myWorkbook.Worksheets[0];
// To convert only the visible contents , set ConverterOptions to Visible
ggExcelConverter.GroupingGridToExcel(this.grdDefault, mySheet1, ConverterOptions.Visible);
myWorkbook.SaveAs("Sample.xls", ExcelSaveType.SaveAsXLS, Response, ExcelDownloadType.PromptDialog);
excelEngine.ThrowNotSavedOnDestroy = false;
excelEngine.Dispose();
>Hi Kathy,
Thank you for posting your query to us.
I am afraid that I am not able to reproduce your issue. I have attached the sample under which I tried to reproduce the issue and the sample is available here.
http://websamples.syncfusion.com/samples/Grid.Windows/67659/main.htmPlease have a look at the above sample and if still the issue exists, could you please try reproducing it
in the above sample or send us the reproducing steps so that we could sort out the cause of the issue
and provide you a solution?
Regards,
Sarathi