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

A filtered GridGroupingControl - sending the filtered data to a Excel worksheet

Thread ID:





96284 Sep 2,2010 07:37 PM UTC Sep 7,2010 11:56 AM UTC WinForms 3
Tags: GridControl
David Mecteaux
Asked On September 2, 2010 07:37 PM UTC

I would like to send the filtered data of a GridGroupingControl to a excel worksheet. I am using some sample code but that only sends the whole table (with no filtereing) to the Excel sheet. How can I just send the data that is being show on the datagrid? Here is the code I was using...

string fileName;
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Excel2010;
fileName = "Sample.xlsx";
IWorkbook workbook = application.Workbooks.Create(1);
IWorksheet sheet = workbook.Worksheets[0];

if(gridReport.DataSource != null)
sheet.ImportDataTable((DataTable)gridReport.DataSource, true, 3, 1, -1, -1);

//??sheet.ImportDataView(new DataView(gridReport


Jisha Joy [Syncfusion]
Replied On September 3, 2010 10:34 AM UTC

Hi David,

You could achieve the desired behavior by using GroupingGridExcelConverterControl and setting the ConverterOptions to visible.

Syncfusion.GroupingGridExcelConverter.GroupingGridExcelConverterControl converter = new
"sample.xls", Syncfusion.GridExcelConverter.ConverterOptions.Visible);


David Mecteaux
Replied On September 3, 2010 02:51 PM UTC

Well I am doing something like that already....but I was looking at the ExcelEngine class and was thinking about some advanced things I could do to when I export to Excel from the GridGroupingControl.

Jisha Joy [Syncfusion]
Replied On September 7, 2010 11:56 AM UTC

Hi David,

Thank you for your update. Is it Possible for you to provide us a sample showing the issue?.



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