I am trying to convert a .ASPX file to a .XLS file.
The file gets downloaded with the data with a row count (17K records) and the actual data in DATAGRID is (20K records).
And if I manually copy the records from DATAGRID and paste it in Excel, all records gets pasted all (20K records).
Please find the below code which executes to download the Excel (.xls) file.
Response.ClearHeaders()
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader("Content-Disposition", "attachment; filename=Test.xls")