Export DataGridView to Excel

Hi

I’m looking for the best way to Export a populated DataGridView to Excel?
It’s a windows forms application C#.Net 2005.

Thanks
deon001Asked:
Who is Participating?
 
Anandavally_PConnect With a Mentor Commented:
Hi
try this site

http://www.codeproject.com/csharp/export.asp

Thanks
Anandavally P
0
 
SystemExpertCommented:
Hi,

You can use SQL REPORTING SERVICES for export to excel,PDF ,..... and you can also  

or

private void ExportLinkButton_Click(object sender, System.EventArgs e)
{
  string strTitle = “put the grid title here”;
  new DataGridExcelExporter(this.YourGridName , this.Page).Export(strTitle);
}
where,

strTitle is the title of the DataGrid.
DataGridExcelExporter is the name of main class.
this.YourGridName is the DataGrid object.
this.Page is the current Page object.


or

 you can go for this link and find the solution

http://www.c-sharpcorner.com/Code/2003/Sept/ExportASPNetDataGridToExcel.asp

http://www.codersource.net/published/view/283/exporting_data_grid_to_excel.aspx

Thanks

0
 
deon001Author Commented:
Thanks for the help and quick response

Deon
0
 
ThejusCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.