Last post Jul 08, 2009 01:53 AM by qwe123kids
Jul 07, 2009 01:46 PM|chickflickssuck|LINK
I have a function, which exports a gridview to excel.
I have had to change my gridview, to an html table for various reasons.
my table is generated with a Literal, as such:
Literal.Text = "<table>"
For each item in my dataset
Literal.Text &= "<tr>"
Literal.Text &= "<td>Some data here</td>"
Literal.Text &= "<td>More here</td>"
Literal.Text &= "</tr>"
Literal.Text &= "</table>"
I want to export this table to excel, and am not sure how exactly to reference each row (or) column (or) cell
My current thought is something like:
For each row as DataRow in Literal.Text
Jul 08, 2009 01:53 AM|qwe123kids|LINK
Response.Buffer = true;
string Strmyexcel ="";
Strmyexcel = Strmyexcel + "<My design>"
Response.ContentType = "application/vnd.ms-excel";
U can export dataset to excel..