OPENROWSET Error

  • HI all,

    I am current getting this error:

    OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" returned message "The Microsoft Jet database engine could not find the object 'Sheet1'. Make sure the object exists and that you spell its name and the path name correctly.".

    When running this code:

    SELECT *

    FROM

    OPENROWSET('Microsoft.Jet.OLEDB.4.0'

    ,'Excel 8.0;Database=c:\test.xls'

    ,'SELECT * FROM [Sheet1$]'

    )

    Could anyone point me in the write direction?

    thanks

    Chris

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • Hi,

    You need to ensure that the file test.xls is in the SQL server's C: drive itself, not in the server/pc where you are executing the statement.

    Hope you find it helpful.

    Regards,

    Jasmin Tang

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply