What we want is the exported worksheet and the SfDataGrid to have the same appearance. Is there anything you can do to help us?
We are looking forward your reply ASAP.
Thank you.
Hi Constantin,
Thank you for contacting Syncfusion Support.
We have analyzed your query and please find the solution for your queries from the below table :
S.No |
Query |
Comments |
1. |
GridStackHeadersDescriptors of the SfDataGrid do not appear in the excel Worksheet |
You can achieve this by setting ExcelExportingOptions.ExportStackedHeaders to True. |
2. |
Excel Worksheet contains also the hidden columns |
We have analyzed your query and you can achieve your requirement by using ExcelExportingOptions.ExcludeColumns property. |
3. |
Excel Worksheet does not contain any style (background color, foreground color, etc) at all. |
We regret to inform you that this is default behavior of SfDataGrid. But, you can set the style to Excel sheet in Exporting time by handling CellExportingHandler and ExportingEventHandler. |
We have prepared a sample based on your all requirement and attached in the below sample link for your reference:
Sample link: http://www.syncfusion.com/downloads/support/directtrac/118396/ExportToExcel-894322957.zip
Please let us know if you require further assistance.
Thanks,
Ashok
Hi Constantin,
We are sorry about the inconvenience caused.
We have analyzed your query and we have provided support for ExcelExportingOptions.ExportStackedHeaders in 12.2 version. So, we request you to upgrade your product version to our current version in order to get the fix for this issue.
Please let us know if you require further assistance.
Thanks,
Ashok
Component Name |
Till v16.1.0.24 |
From v16.1.0.32 |
Grid WPF |
Syncfusion.SfGrid.WPF40
Syncfusion.SfGrid.WPF45
Syncfusion.SfGrid.WPF451
Syncfusion.SfGrid.WPF46 |
Syncfusion.SfGrid.WPF |