I have the following code to create excel application in NT Server, MS Office has been installed, but i still get error in createobject (excel.application), any ideas???
Urgent!
thx.
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Provider = "Microsoft.Jet.OLEDB.4.0"
oConn.Open(Server.MapPath("test.mdb"))
set rs=oConn.Execute("select * from customer")
response.write(rs("cust_code").value)
'Create a new workbook in Excel
Dim oExcel
Dim oBook
Dim oSheet
Set oExcel = Server.CreateObject("Excel.Application")
Set oBook = oExcel.Workbooks.Add
Set oSheet = oBook.Worksheets(1)
'Transfer the data to Excel
oSheet.Range("A1").CopyFromRecordset rs
'Save the Workbook and Quit Excel
oBook.SaveAs "Mytest.xls"
oExcel.Quit
Bookmarks