Export To Excel

Hi

I use

 GridGroupingExcelConverterControl excelConverter = new GridGroupingExcelConverterControl();

ExcelExportingOptions exportingOptions = new ExcelExportingOptions();

//Exclude

 exportingOptions.ExcludeColumns.Add("ShipCity");

 exportingOptions.ExcludeColumns.Add("Name");

1. Exclude  - did not work /  despite the exclusion in the excel file is unchanged

his.gridGroupingControl1.TableDescriptor.Columns["EMI"].HeaderText = "EMI 123!!";

this.gridGroupingControl1.TableDescriptor.Columns["Country"].HeaderText = "Country 123!!";

this.gridGroupingControl1.TableDescriptor.Columns["ShipCountry"].HeaderText = "ShipCountry 123!!";

2 .

how to make them appear in the excel file two lines    name and  HeaderText

EMI 123!!        Country 123!!           ShipCountry 123!!

EMI                 Country                     ShipCountry

3. how to do excel format .Format = "0.##"   in  Columns["EMI"]

please help

Regards,







Attachment: ExportToExcel_test_841e2569.rar

3 Replies

BT Balamurugan Thirumalaikumar Syncfusion Team August 24, 2021 10:55 AM UTC

Hi Gregory, 

Thank you for interesting in Syncfusion products. 

We have checked your queries at our end. Please refer the following details for your reference. 

1.Exclude  - did not work /  despite the exclusion in the excel file is unchanged 
We have checked this query at our end. If you want to exclude a column from the grid when exporting it to Excel, you can add it in the ExcludeColumns List. For your convenience, we have provided the following documentation. We've also modified the provided sample to achieve this scenario. 

2 .how to make them appear in the excel file two lines    name and  HeaderText 
In order to achieve this scenario you can refer the following KB for your reference. 

3. how to do excel format .Format = "0.##"   in  Columns["EMI"] 
We have checked the provided sample at our end. We would like to inform you that you must specify the DateTime and Double column's type as DateTime and Double in its underlying datatable in order to format the column values when setting the format. You can refer the following  code snippet and modified sample for your reference. 


Please let us know if you would require any other assistance. we will be happy to assist you 

Thanks & Regards, 
Balamurugan Thirumalaikumar


GP Gregory Pe August 24, 2021 06:40 PM UTC

Thank you for your help




BT Balamurugan Thirumalaikumar Syncfusion Team August 25, 2021 05:15 AM UTC

Hi Gregory, 

Thank you for the update. 

We are very glad to have the provided solutions resolved your query. please get back to us at any time if you need any other assistance. As always we will be happy to assist you. 

Balamurugan Thirumalaikumar  



Loader.
Up arrow icon