Load Excel into DB

  • I am trying to load Excel file into DB. I have 64-bit SQL Server and 32-bit Excel.

    When I run

    SELECT *

    FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0',

    'Excel 14.0;Database=C:\Client1.xls',

    'SELECT * FROM [Sheet1$]')

    I get error:

    Msg 7308, Level 16, State 1, Line 1

    OLE DB provider 'Microsoft.ACE.OLEDB.12.0' cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode.

    Please help to resolve this.

    Thanks.

  • Try it with a different driver and see if you get a better result. Try using 'Microsoft.Jet.OLEDB.4.0' instead of 'Microsoft.ACE.OLEDB.12.0'.

    Joie Andrew
    "Since 1982"

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

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