S
staeri
I'm trying to export a datalist to Excel with this code:
Response.Clear()
Response.Buffer = True
Response.Charset = ""
Response.ContentType = "application/vnd.ms-excel"
Me.EnableViewState = False
Dim sw As StringWriter = New StringWriter()
Dim hw As HtmlTextWriter = New HtmlTextWriter(sw)
DataList1.RenderControl(hw)
Response.Write(sw.ToString())
Response.End()
Unfortunately all the format set from css is lost. Is there a way to
get around this?
Regards,
S
Response.Clear()
Response.Buffer = True
Response.Charset = ""
Response.ContentType = "application/vnd.ms-excel"
Me.EnableViewState = False
Dim sw As StringWriter = New StringWriter()
Dim hw As HtmlTextWriter = New HtmlTextWriter(sw)
DataList1.RenderControl(hw)
Response.Write(sw.ToString())
Response.End()
Unfortunately all the format set from css is lost. Is there a way to
get around this?
Regards,
S