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

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

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

 

Article ID: Published Date: Last Revised Date: Platform: Control: .NET Framework: Product Version:
4882 05/14/2015 01/25/2016 WinRT SfDataGrid 4 12.1.0.43
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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.