export from literals to excel-check it out

Posted by Oswaldlily under ASP.NET on 9/29/2011 | Points: 10 | Views : 1015 | Status : [Member] | Replies : 0
Protected Sub btnEmploy_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnEmploy.Click
dim a as string =txtname.Text
dim b as string-txtemp.Text
dim query = ProgramMapper.EmploymentDetails(a,b)
Dim tbl As String = ""
tbl = tbl & "<table border='0' cellpadding='2' cellspacing='1' bgcolor='#0c0c0c' align='center' width='500'><tr bgcolor='#fbfff4'><td><b><center>Employer Id</center> </b> </td><td><b><center>Employer name </center></b></td></tr>"
For Each r In query
tbl = tbl & "<tr bgcolor='#fbfff4'><td><div style='width: 100px; word-wrap: break-word'>" & r.column1 & "</div></td><td><div style='width: 400px; word-wrap: break-word'>" & r.column2 & "</div></td><td class='tblstyle'><div style='width: 400px; word-wrap: break-word'>" & r.screen & "</div></td></tr>"
tbl = tbl & "</table>"
Literals1.Text = tbl
end sub

Protected Sub lnkEmploy_Click(ByVal sender As Object, ByVal e As EventArgs) Handles lnkEmploy.Click
"I need to export table which is in literals into excel"
"can i call it directly from excel without reusing query"
"Or in button click itself I need to store that in dataset??"

end sub


(No response found.)

Login to post response