I need to export my htmltable to excel..
My html table is in literals.
I have link button-link1
when i click this link1 my html table shd export to excel file..
my excel file name is Book1.xlsx which is empty at present.
at present my coding is
Response.Clear()
Response.ContentType = "application/ms-excel"
Response.AddHeader("Content-disposition", "attachment;filename=Book1.xlsx")
Dim sw As System.IO.StringWriter = New System.IO.StringWriter()
Dim hw As HtmlTextWriter = New HtmlTextWriter(sw)
literals1.RenderControl(hw)
Response.Write(sw.ToString())
Response.End()
how to do this..can any1 suggest me ?