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. Image for the cookie policy date

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

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.




4 Replies

AR Ajith R Syncfusion Team 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


PR pradheep 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


AR Ajith R Syncfusion Team 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

 



AR Ajith R Syncfusion Team 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

Loader.
Live Chat Icon For mobile
Up arrow icon