Hi i am doing project in asp.net using
vb
i want to show the output in excel format.
after closing the excel application also
i can see the EXCEL.EXE in my taskmanager means in PRocesses tab i can see the
EXCEL.EXE. how to close this EXCEL>EXE from memory.If i run my code 10 times 10 EXCEL.EXE are shoing in taskmanager.
my code like this
Dim excel As New Excel.Application
excel.Application.Workbooks.Add(True)
lcdgrd.Visible = True
Dim table1 As System.Data.DataTable
table1 = GetData()
Dim col As DataColumn
Dim colIndex As Integer
Dim rowIndex As Integer
rowIndex = 1
For Each col In table1.Columns
colIndex += 1
excel.Cells(rowIndex, colIndex) = col.ColumnName
Next col
Dim row As DataRow
For Each row In table1.Rows
rowIndex += 1
colIndex = 0
For Each col In table1.Columns
colIndex += 1
excel.Cells(rowIndex, colIndex) = row(col.ColumnName).ToString()
Next col
Next row
excel.Application.Visible = True
excel = Nothing
pl advice me. thanks
sr