Solved

Export DataGridView to Excel

Posted on 2006-06-19
4
21,018 Views
Last Modified: 2011-08-18
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
0
Comment
Question by:deon001
4 Comments
 
LVL 10

Expert Comment

by:SystemExpert
ID: 16941676
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
 
LVL 2

Accepted Solution

by:
Anandavally_P earned 500 total points
ID: 16942882
Hi
try this site

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

Thanks
Anandavally P
0
 

Author Comment

by:deon001
ID: 16957794
Thanks for the help and quick response

Deon
0
 

Expert Comment

by:Thejus
ID: 21059592
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question