Exporting Excel to sql server Temporary table.

Posted by Renju on Stack Overflow See other posts from Stack Overflow or by Renju
Published on 2009-07-20T12:30:02Z Indexed on 2010/03/21 22:01 UTC
Read the original article Hit count: 325

Filed under:

I need to take all the values in an excel file to a temporary/physical table in SQL Server 2005. I don't need the Import export method. I tried the following linked server method:

SELECT * 
INTO db1.dbo.table1
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 
    'Driver={Microsoft Excel Driver (*.xls)};DBQ=c:\renju.xls', 
    'SELECT * FROM [sheet1$]')

But it is returing an error as:

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

I'm using Excel 2003, and I've already added the linked server for "Microsoft.Jet.OLEDB.4.0."

© Stack Overflow or respective owner

Related posts about sql-server