openrowset

  • Hi,

    I have an excel worksheet - sheet 1 renamed as 'test'

    I am trying to use openrowset in my select statement like:

    SELECT

    *

    FROM

    OPENROWSET('Microsoft.Jet.OLEDB.4.0',

    'Excel 2003;Database=D:\Book1.xls;IMEX=1',

    'SELECT * FROM [test$]')

    What is it that I am doing wrong

    But i get the following error message:

    OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" returned message "Could not find installable ISAM.".

    Msg 7303, Level 16, State 1, Line 1

    Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".

     

    What is it that I am doing wrong ... Please guide.

    Thanks.

  • I use this feature frequently but my syntax looks like: 

    SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;IMEX=1;Database=D:\Book1.xls;', test$)

    I think it is a matter of where the quotes are.

  • Hi,

    Check it out Ad hoc Remote Queries is enabled or not. If not go to Surface Area Configuration and do activate it. And when fire the query close the Excel Sheet other wise it will give error.

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

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