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

Unable to export $ symbol from gridgrouping control to excel using GridExcelExport

Thread ID:

Created:

Updated:

Platform:

Replies:

110619 Aug 16,2013 12:31 PM UTC Aug 22,2013 12:15 PM UTC ASP.NET Web Forms (Classic) 4
loading
Tags: GridGroupingControl
pradheep
Asked On August 16, 2013 12:31 PM UTC

Unable to export $ symbol from gridgrouping control to excel using GridExcelExport class. 

GridExcelExport GRD = new GridExcelExport(grdReport, "GridBasedReport.xls");
 GRD.Export();

where
grdReport->GridGrouping control. Where it displayes the $symbol and its datasource doesnot have doller symbol. 

During exoport it eliminates the $ symbol in Excel.




Ajith R [Syncfusion]
Replied On August 19, 2013 11:51 AM UTC

Hi Pradheep,

 

Thanks for using Syncfusion products.

 

Query : Unable to export $ symbol from gridgrouping control to excel using GridExcelExport?

 

To achieve your requirement, we suggest you handle the ExcelOnCompleteHandler event in the button click control and formatting the number in the excel sheet by using below code snippet.

 

[aspx.cs]

 

void excel_ExcelOnCompleteHandler(object sender, OnExportExcelEventArgs e)

        {

            var column = e.workbook.ActiveSheet.Columns[1];       

            for(int i=0;i<column.Rows.Length;i++)

            {

                column.Rows[i].NumberFormat = "$##,###.##";           

            }                        

        }

 

Please refer the below UG link to know further details about number formatting in the excel sheet.

 

http://help.syncfusion.com/ug/asp.net/xlsio/default.htm#!documents/numberformatting.htm

 

Please refer the below link to download the sample.

 

Please let us know if you have any concerns.

 

Regards,

 

Ajith R

 

 

 



Sample_f2a61c01.zip

pradheep
Replied On August 22, 2013 06:22 AM UTC

Hi,
      I  have tried with the sample code what you have provided in zip format. But I do get  The type or namespace name 'OnExportExcelEventArgs' could not be found (are you missing a using directive or an assembly reference?) while building the application. Any Idea

Ajith R [Syncfusion]
Replied On August 22, 2013 11:10 AM UTC

Hi Pradheep,

 

Thanks for your update.

 

Query : The type or namespace name 'OnExportExcelEventArgs' could not be found?

 

We are sorry for the inconvenience caused. We suspect that you have missed some important references in your project. Please refer the below screen shot to review the references in your project.

 

 

 

If issue still persist please get back to us with essential studio version and other issue related information, so that we could sort out the issue and provide you with solution. The information provided would be of great help in resolving the issue.

 

Please let us know if you have any concerns.

 

Regards,

 

Ajith R

 


Ajith R [Syncfusion]
Replied On August 22, 2013 12:15 PM UTC

Hi Pradheep, 

Thanks for your update. 

Query : The type or namespace name 'OnExportExcelEventArgs' could not be found?

Please ignore the previous update. 

We are sorry for the inconvenience caused. We suspect that you have missed some important references in your project. Please refer the below attachment to review the references in your project.

If issue still persist please get back to us with essential studio version and other issue related information, so that we could sort out the issue and provide you with solution. The information provided would be of great help in resolving the issue. 

Please let us know if you have any concerns. 

Regards, 

Ajith R

 



Capture_dd3fa0aa.zip

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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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

;