We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Couldn''t export grid to excel

Thread ID:

Created:

Updated:

Platform:

Replies:

73511 May 8,2008 02:06 PM UTC Jun 3,2008 06:51 AM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: XlsIO
Saravana Kumar
Asked On May 8, 2008 02:06 PM UTC

Hi,

The following code wasn't able to export the datagrid to excel: Please help me on this issue


GroupingGridExcelConverterControl ggExcelConverter = new GroupingGridExcelConverterControl();
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
IWorkbook myWorkbook = excelEngine.Excel.Workbooks.Add();
IWorksheet mySheet = myWorkbook.Worksheets[0];
this.GridGroupingControl1.Appearance.AnyCell.Font.Size = 10;
ggExcelConverter.GroupingGridToExcel(this.GridGroupingControl1, mySheet, ConverterOptions.Visible);
myWorkbook.SaveAs(this.GridGroupingControl1.TableDescriptor.Name + ".xls", ExcelSaveType.SaveAsXLS, Context.Response, ExcelDownloadType.PromptDialog);
excelEngine.ThrowNotSavedOnDestroy = false;
excelEngine.Dispose();


Yavanaarasi G [Syncfusion]
Replied On June 3, 2008 06:51 AM UTC

Hi Saravana,

Thank you for your interest in Syncfusion products.

I am afraid that I was not able to reproduce the issue. I have created a simple sample with your code snippet and test this issue. Here exporting the grid to excel works fine.

Please refer the sample in the below link:

http://websamples.syncfusion.com/samples/Grid.Web/6.2.0.40/73511/ExportGridtoExcel.Zip

Please have a look at the above sample and if still the issue exists, could you please try reproducing it in the above sample and send us the modified sample so that we could sort out the cause of the issue
and provide you a solution?

Regards,
G.Yavana





CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;