Hi ,
I have no idea on how to export data to Ms Excel 2000.
I have a screen which contain a check box list that allow user to select which fields to be exported to MS Excel.
When user checked on the check box, that field's data from database will be exported to Ms Excel.
My program is client -based system.
Programming language=VB.NET
Software=MS Visual Studio.net2003
Platform=Window XP Pro,SP1
Thanks for all of yours helps......
Carol
hi carol
just try this you can insert records into excel with this code.
******************************************
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
'Create new Excel Object
Dim MyExcel As Excel.Application
MyExcel = New Excel.Application
MyExcel.DisplayAlerts = False
MyExcel.Workbooks.Open("C:\Inetpub\wwwroot\WebAppl ication1\Excel1.xls")
Label1.Text = MyExcel.ActiveWorkbook.ActiveSheet.Cells(1, 1).Value
'Insert data into particular cell of Excel Sheet
MyExcel.ActiveWorkbook.ActiveSheet.cells(2, 4) = "Example"
MyExcel.ActiveWorkbook.Save()
MyExcel.ActiveWorkbook.Close(False, "C:\Inetpub\wwwroot\WebApplication1\Excel1.xls ")
MyExcel.DisplayAlerts = False
MyExcel.Quit()
ReleaseComObject(MyExcel)
MyExcel = Nothing
GC.Collect(1)
GC.WaitForPendingFinalizers()
End Sub
********************************
but informing you that i have problem with this code is that..
my Excel.EXE is still running in background even after i close my application.
i am still trying on that..mean time if you get something how to kill it let me know
thanks
mady