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
close icon

Export selected columns from griddatabound to excel


In my project, after using the FieldChooser, I need to export remaining columns to excel. How can I do this?


4 Replies

MO Marius Ovidiu Lancrangean November 1, 2016 12:46 PM UTC

Ok. It was simple.
GroupingGridExcelConverterControl converter = new GroupingGridExcelConverterControl();
		// Export the contents of the Grid to Excel
		converter.GroupingGridToExcel(this.grid@"C:\temp\Export.xls"ConverterOptions.Visible | ConverterOptions.ColumnHeaders);

AR Amal Raj U Syncfusion Team November 2, 2016 07:09 AM UTC

Hi Marius, 

Thanks for using Syncfusion products. 

We are glad to know that you have found the solution for your issue to export the visible columns using ConverterOptions. Please let us know, if you have any queries. 

Amal Raj U. 

MR Marcus Ricardo Gomes Guedes May 10, 2018 07:53 PM UTC

        Dim converter As New GroupingGridExcelConverterControl()

        converter.GroupingGridToExcel(GridC100, "c:\temp\xxx.xls", Syncfusion.GridExcelConverter.ConverterOptions.ColumnHeaders)

Valor de tipo 'Syncfusion.Windows.Forms.Grid.Griddataboundgrid' não pode ser convertido para 'Syncfusion.Windows.Forms.Grid.Grouping.Gridgroupingcontrol'

Translate: Value type 'Syncfusion.Windows.Forms.Grid.Griddataboundgrid' cannot be converted to  'Syncfusion.Windows.Forms.Grid.Grouping.Gridgroupingcontrol'

Hello, i´m getting the error above. Plz help me to know how to export griddatabound to excel using vb.net.

SN Sindhu Nagarajan Syncfusion Team May 11, 2018 12:10 PM UTC

Hi Marcus, 

Thanks for contacting Syncfusion support. 

The GroupingGridExcelConverterControl class is used for exporting GridGroupingControl only. So, we request you to use GridExcelConverterControl class to export the GridDataBoundGrid control.  

Please refer to the below KB document to export data in GridDataBoundGrid to excel sheet. 

Code Example 
private void button1_Click(object sender, EventArgs e) 
    GridExcelConverterControl gecc = new GridExcelConverterControl(); 
    gecc.GridToExcel(this.gridDataBoundGrid1.Model, "xcel.xls");   

Please let us know if you have any other queries. 


Live Chat Icon For mobile
Up arrow icon