string attachment = "attachment; filename=Sheet1.xls"; Response.ClearContent(); Response.AddHeader("content-disposition", attachment); Response.ContentType = "application/vnd.ms-excel";
//Before exporting you can wrap the words by making cell.wrap = true For Each Row In GridView1.Rows For Each Cell In Row.Cells Cell.Wrap = True Next Next
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)