Export to excel
-
I use the following code to export a page to excel. My problem is that i can't change the sheet name in excel file its always the physical name of the page not even its title! Response.Clear(); Response.Buffer= true; Response.ContentType = "application/vnd.ms-excel"; Response.Charset = ""; Response.AddHeader("content-disposition", "inline;filename=MyExcelFile.xls");
marcoryos
-
I use the following code to export a page to excel. My problem is that i can't change the sheet name in excel file its always the physical name of the page not even its title! Response.Clear(); Response.Buffer= true; Response.ContentType = "application/vnd.ms-excel"; Response.Charset = ""; Response.AddHeader("content-disposition", "inline;filename=MyExcelFile.xls");
marcoryos
hi try this Response.AddHeader("Content-Disposition", "attachment; filename=data1.txt"); regards saravanan