Rectify my error in copyin html table to excel

Posted by Oswaldlily under ASP.NET on 9/7/2011 | Points: 10 | Views : 1369 | Status : [Member] | Replies : 0
Condition1)First table should be in left side of first excel sheet and
second table should be in right side of first excel sheet
*Just little movement not to the extreme

Response.AddHeader("Content-disposition", "attachment;filename=excel.xls")
Response.Charset = ""
Response.ContentType = "application/"
Response.Buffer = True
Me.EnableViewState = False

Dim FileName As String = "MyXls/excel.xls"
'*** Create Excel.Application ***'
Dim xlApp As New Excel.Application
Dim xlBook As Excel.Workbook
'Dim xlCells As Excel.Range
xlBook = xlApp.Workbooks.Add()
xlBook.Application.Visible = False
'*** Create Sheet 1 ***'
Dim sw As System.IO.StringWriter = New System.IO.StringWriter()
With xlApp.ActiveSheet
xlBook.Worksheets(1).Name = "Employee details"
..................(has html table here)....................
"Called html table here and my table is in table1"
literal1.Text = table1 (now i stored my html table in literals)
From this literals it should export to my first sheet of excelsheet.(name-Employee details)
End With

// second table starts
With xlApp.ActiveSheet
literal2.Text = table2
Dim sw2 As System.IO.StringWriter = New System.IO.StringWriter()

End With


(No response found.)

Login to post response