Depending on the complexity of the pageβs HTML page, you can leave by simply changing the title type to application/excel . Excel has built-in html parsing functionality. I successfully did this many times several years ago using the DataGrid on the page.
Response.ContentType = "application/excel" Response.AppendHeader "content-disposition", "attachment: filename=TestExcelFile.xls"
Some HTML information in excel
used2could Apr 21 '10 at 11:19 2010-04-21 11:19
source share