dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: cannot create excel application

Hybrid View

  1. #1
    Join Date
    Jan 2003
    Posts
    8

    Angry cannot create excel application

    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

    'Close the connection
    rs.Close
    oConn.Close

  2. #2
    Join Date
    Jan 2003
    Posts
    8
    I am getting this error for the create excel object in previous message:

    Server object error 'ASP 0177 : 80080005'

    Server.CreateObject Failed

    /test/mytest.asp, line 32

    Server execution failed

    Any ideas?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles