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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Exporting only filtered data from GridView to Excel using XLSIO

Thread ID:





57001 Feb 23,2007 02:02 PM UTC Mar 7,2007 03:33 AM UTC ASP.NET Web Forms (Classic) 2
Tags: XlsIO
Administrator [Syncfusion]
Asked On February 23, 2007 02:02 PM UTC


Is there an easy way to export data to Excel from a GridGroupingControl after the user does filtering on a column or columns.

Please attach any sample if possible.


Administrator [Syncfusion]
Replied On February 26, 2007 09:42 PM UTC

Hi Rekha,

The Excel Export ( \Syncfusion\Essential Studio\\Windows\Grid.Grouping.Windows\Samples\Serialization\Excel Export )sample demonstrates the conversion of contents in a GridGroupingControl to an xls file. The Exporting of a GridGroupingControl has two options: one converts the entire contents in the grid while the other converts only the visible contents in the grid(only filtered records).

The XlsIO libraries are used to convert the grid contents to excel. The dlls that these depend on are Syncfusion.XlsIO.Base and Syncfusion.GridConverter.Windows.

Syncfusion.GroupingGridExcelConverter.GroupingGridExcelConverterControl converter = new
converter.GroupingGridToExcel(this.gridGroupingControl1, FileName,Syncfusion.GridExcelConverter.ConverterOptions.Default);

The above code converts the entire contents in the grid. The code to export the visible or expanded records or groups alone is given below.

converter.GroupingGridToExcel(this.gridGroupingControl1, FileName, Syncfusion.GridExcelConverter.ConverterOptions.Visible);

Here is a sample.
Excel Export.zip

Best regards,

Administrator [Syncfusion]
Replied On March 7, 2007 03:33 AM UTC

Hi Haneef,

Thanks for your quick response!

Is it possible to turn the autofilter ON in the Excel spreadsheet after the export of filtered data?



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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