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

How to export groups to Excel and also export group Outlining from SfDataGrid?

Platform: UWP |
Control: SfDataGrid |
.NET Framework: 4 |
Product Version: 12.1.0.43

In SfDataGrid control, you can export data to Excel by using the ExportToExcel method that has ExcelExportingOptions as an argument. ExcelExportingOptions provides various properties to customize the exporting. You can expand or collapse the exported group in Excel by setting the AllowOutlining property to True in ExcelExportingOptions. The default value of this property is True, so you can expand or collapse the exported group in Excel until you explicitly set this property as False.

 

C#

 

The following snapshot illustrates the result of the above code in SfDataGrid.

 

Expanded and Collapsed group in Grid:

D:\Syncfusion\Issues\2014 Volume 2\KB Issues\KB Images\ExportGrid.PNG

Expanded and Collapsed group in the Exported Excel:

 D:\Syncfusion\Issues\2014 Volume 2\KB Issues\KB Images\ExportExcel.PNG

Sample Links:

WPF

WRT

UWP

 

2X faster development

The ultimate UWP UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

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

Up arrow icon

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

Live Chat Icon For mobile