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.
Unfortunately, activation email could not send to your email. Please try again.

Error when trying to export to excel

Thread ID:

Created:

Updated:

Platform:

Replies:

75224 Jul 16,2008 12:48 PM Jul 17,2008 12:10 AM ASP.NET Web Forms (Classic) 1
loading
Tags: GridGroupingControl
Kathy Gray
Asked On July 16, 2008 12:48 PM

When I copy the code you have in your example for exporting the grid to excel, I get the following error:

'GroupingGridExcelConverterControl' is ambiguous in the namespace 'Syncfusion.GroupingGridExcelConverter'.


Rajarajeswari S [Syncfusion]
Replied On July 17, 2008 12:10 AM

Hi Kathy,

Thanks for using Syncfusion products.

Currently, we have the Excel export feature implemented with full support to the auto-formats present in the Grid. Please check out the details below,

. Exporting the data to excel file.
. Exporting the background color of the Grid (when AutoFormat is set) to excel file.
. Exporting the Grouped, Summary columns.
. Excel file, columns and rows can be autofitted.

Please refer the below code snippet which illustrates the above:


GroupingGridExcelConverterControl ggExcelConverter = new GroupingGridExcelConverterControl();
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
IWorkbook myWorkbook = excelEngine.Excel.Workbooks.Create(2);
IWorksheet mySheet = myWorkbook.Worksheets[0];
ggExcelConverter.AutofitColumns = true; // used to Autofit the Excel columns
ggExcelConverter.AutofitRows = true; // used to Autofit the Excel rows
ggExcelConverterGroupingGridToExcel(myWorkbook,this.GridGroupingControl1, mySheet, ConverterOptions.Visible);
myWorkbook.SaveAs("Color.xls",ExcelSaveType.SaveAsXLS,Response,ExcelDownloadType.PromptDialog);


Please refer the sample from the below link which illustrates this:

http://websamples.syncfusion.com/samples/Grid.Web/6.2.0.39/Grid_Web_Excel/main.htm

The above sample is in 6.2.0.39 version, but you can find the modified version of this code present in the "App_Code" directory of the sample. These classes would work with latest version(6.3.0.30) of Essential Studio also.

- Copy the files present under "App_Code" directory of the sample.
- Paste it in your application''s "App_Code" folder.

Once you have the files in your "App_Code" directory of your application, the new classes would be referred. So no need to refer the Syncfusion.GridConverter.Web.dll.


Note:

Please refer the below link to download our latest version 6.3.0.30:

DownLoad Link:

http://www.syncfusion.com/downloads/latestversion/default.aspx

Unlock key:

If your Essential Studio license is current, you will be able to obtain the key to install this version from your account in DirectTrac. Otherwise, please contact your Syncfusion Sales Representative or e-mail salessupport@syncfusion.com .

Please let me know if you have any other concerns.

Regards,
Raji



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.

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.

;