Author: ashwinanimal | Posted on: 6/4/2009 2:38:32 PM | Views : 447

I'm using the following event handler to write to Excel:
1    protected void btnExport2excel_Click( object sender, EventArgs e )
2        {
3          Response.Clear();
4          Response.Buffer = true;
5          Response.AppendHeader( "content-disposition", "attachment;filename=DRS.xls" );
6          Response.ContentType = "application/vnd.ms-excel";
7          Response.Write( "This\ta\ttest\nto\tsee\tif\nI ...

Go to the complete details ...