We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Issue with GridWeb to SaveToExcelFile

hi,
I have a workbook with excelsheets those sheets have with image company logo.
i am able to show image on Gridweb but when try to save to excel it gives me error:

first issue with Gridweb when save to excel using this code:

GridWeb1.WebWorksheets.SaveToExcelFile("RegMonthEnd.Xlsx");
ERROR:
Unable to cast object of type 'Aspose.Cells.GridWeb.Data.Picture' to type 'System.Collections.SortedList'.

second issue i comment out image and than try to save file gets saved in xlsx format but when try to open that file it says file corrupted .

I have attached code for your refernce. I am using datasource for webgrid:
GridWeb1.WebWorksheets.ImportExcelFile(wb.SaveToStream());

Hi Piyush,

Thanks for using Aspose.Cells.

I tried to run your code but there are some compile time errors which I am not able to fix. Kindly provide us your sample runnable project replicating this issue so that we could investigate this issue further.

Please keep the sample as simple as possible because it will help us sort out this issue more quickly.