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 data to excel

Thread ID:





73584 May 12,2008 12:24 PM UTC May 14,2008 09:33 AM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On May 12, 2008 12:24 PM UTC

I am trying to export data from GridGrouping control to excel. while exporting I want my grid columns to be exported iin a paticular order while the order of columns in grid should not change.Is it possible?????
Or can i Export a datatable to excel ????
If both are not possible kindly suggest a way to overwrite data for a particu;ar column in the excel sheet created by exporting data from gridcontrol.Quick response will be highly Appreciated.

Thanks in advance
Ranju Malhotra

Administrator [Syncfusion]
Replied On May 14, 2008 09:33 AM UTC

Hi Ranju,

You can a export a Datatable to the excel. Please refer the following code snippet that shows how we can export a Datatable to te Excel.

private void Export_Click(object sender, System.EventArgs e)
Syncfusion.GroupingGridExcelConverter.GroupingGridExcelConverterControl converter = new


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

if(saveFileDialog.ShowDialog() == DialogResult.OK)
converter.GroupingGridToExcel(this.gridGroupingControl1, saveFileDialog.FileName,
else if(radioButton2.Checked)


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 following sample in the below link that illustrates the above.


You can also refer the GridExport sample :

\\Syncfusion\EssentialStudio\\Windows\Grid.Grouping.Windows\Samples\2.0\Serialization\Excel Export\



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

or the page will be automatically redirected to 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