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

Essential grid - C# - .NET 2.0

Thread ID:





73437 May 7,2008 06:58 AM UTC May 13,2008 12:29 PM UTC WinForms 2
Tags: GridControl
Alain Nagels
Asked On May 7, 2008 06:58 AM UTC


I have a grid with several columns.
I want to export this grid to Excel and every column has to come in a seperate sheet.
I must also keep the layout of the grid in the Excel file.

How can I do this in a very efficient way?

Thanks in advance.

Administrator [Syncfusion]
Replied On May 9, 2008 02:24 PM UTC

Hi Alain,

There is no built-in support for this behavior. If you want to export the selected Column to excel, you need to derive the GridExcelConverterControl class and implement the SelectedRowExport method. Please refer the following code snippet.

private void button2_Click(object sender, System.EventArgs e)
Syncfusion.GridExcelConverter.GridExcelConverterControl gecc = new Syncfusion.GridExcelConverter.GridExcelConverterControl();

SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.Filter = "Files(*.xls)|*.xls";
saveFileDialog.DefaultExt = ".xls";

if(saveFileDialog.ShowDialog() == DialogResult.OK)
gecc.GridToExcel(this.gridDataBoundGrid1.Model, saveFileDialog.FileName,

if(MessageBox.Show("Do you wish to open the xls file now?", "Export to Excel", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
Process proc = new Process();
proc.StartInfo.FileName = saveFileDialog.FileName;

Please refer the sample in the below link that illustrates the above.



Alain Nagels
Replied On May 13, 2008 12:29 PM UTC

Hello Asem

Ok, thanks for your response.




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