September 24, 2010 at 4:04 am
Hi there, I am trying to set up a linkedserver from SQL Server 2008 to excel. I create the linkedserver but when I test it get an error. Has anyone seen this before? I have verified that the SQL Server account has access to the .xls file.
Microsoft SQL Server 2008 (SP1) - 10.0.2734.0 (Intel X86)
Linkedserver code:
EXEC master.dbo.sp_addlinkedserver @server = N'EXCEL1', @srvproduct=N'Excel 8.0', @provider=N'Microsoft.Jet.OLEDB.4.0', @datasrc=N'c:\myexcel.xls'
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'EXCEL1',@useself=N'True',@locallogin=NULL,@rmtuser=NULL,@rmtpassword=NULL
Error:
Unrecognized database format 'c:\myexcel.xls'
Microsoft SQL Server Error 7303
Any ideas what the issue is? Thanks.
September 24, 2010 at 4:49 am
excel 8.0 is compatible for excle 2007 and below.....is your excel file meeet this requirement?
----------
Ashish
September 24, 2010 at 5:07 am
Hi, Yes my excel file is 2002.
September 24, 2010 at 5:12 am
can you try to create linked server using gui..
Steps are(as mentioned in support.microsoft) :-
In SQL Server Management Studio, expand Server Objects in Object Explorer.
Right-click Linked Servers, and then click New linked server.
In the left pane, select the General page, and then follow these steps:
In the first text box, type any name for the linked server.
Select the Other data source option.
In the Provider list, click Microsoft Jet 4.0 OLE DB Provider.
In the Product name box, type Excel for the name of the OLE DB data source.
In the Data source box, type the full path and file name of the Excel file.
In the Provider string box, type Excel 8.0 for an Excel 2002, Excel 2000, or Excel 97 workbook.
Click OK to create the new linked server.
security and other option you can configure as you would like to be
----------
Ashish
September 24, 2010 at 5:49 am
Yes tried this and got a different error message:
Could not find installable ISAM.
I have checked and the c:\winnt\system32\msexcl40.dll is registered. Thanks.
September 24, 2010 at 6:09 am
i am trying to replicate the problem, but till then you can have a look of this article :-
http://support.microsoft.com/default.aspx?scid=kb;en-us;90111&Product=acc97
Also I am assuming, your excel file is not password protected
----------
Ashish
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply