Import an Excel file into sql server

  • I have an excel file that I'm trying to import into sql server 2005. I keep getting the following error

    ERROR

    Msg 7399, Level 16, State 1, Line 1

    The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "XLTEST_SP" reported an error. The provider did not give any information about the error.

    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 "XLTEST_SP".

    I ran the attached script.

  • Is this an Excel 2007 (xlsx) file? If so, you may need to install a newer data provider. I'll admit not being experienced using a direct connection with OpenRowSet or the like, but have found working with SSIS that although SQL 2005 has a provider built in for Excel 97-2003, unless you've installed MS Office on the same machine (and who does that on their SQL servers?), you have to install the separately available OLE DB provider for the Microsoft Office 12.0 Access Database Engine.

    MS gives an explanation and download link at http://msdn.microsoft.com/en-us/library/cc280527.aspx. Although the article is under the SSIS umbrella, I would think it applicable no matter how you use SQL to access Excel.

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

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