SQL Server Performance Forum – Threads Archive
Create Linked Server Error for Excel!
I am trying to export results into Excel sheet by creating temporary linked server and executing the SP. It is throwing this error. Any suggestion on this error? — Creating a temporary linked server in order to Export DataEXEC sp_addlinkedserver ‘ExcelSource’,
‘Jet 4.0’,
‘Microsoft.Jet.OLEDB.4.0’,
@FileName,
NULL,
‘Excel 5.0’ Output
———————————————–
The syntax of the command is incorrect.
NULL
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider ‘Microsoft.Jet.OLEDB.4.0’ reported an error. The provider did not give any information about the error. Thanks, Name
———
Dilli Grg (1 row(s) affected)
It could be filename variable is the issue… Try using Opendatasource or Openrowset to read excel data… http://www.databasejournal.com/features/mssql/article.php/3331881
MohammedU.
Moderator
SQL-Server-Performance.com All postings are provided “AS IS†with no warranties for accuracy.
quote:Originally posted by MohammedU
It could be filename variable is the issue…
Try using Opendatasource or Openrowset to read excel data…
http://www.databasejournal.com/features/mssql/article.php/3331881
MohammedU.
Moderator
SQL-Server-Performance.com All postings are provided “AS IS†with no warranties for accuracy.
MohammedU.
Moderator
SQL-Server-Performance.com All postings are provided “AS IS†with no warranties for accuracy.
MohammedU,
Thanks for the reply. This is other way around actually. By looking at quickly it looks like the link talks about querying Excel source but I am exporting results into Excel. I will look into details. Thanks, Name
———
Dilli Grg (1 row(s) affected)
check the following …
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926
MohammedU.
Moderator
SQL-Server-Performance.com All postings are provided “AS IS†with no warranties for accuracy.
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by MohammedU</i><br /><br />check the following …<br /<a target="_blank" href=http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926>http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926</a><br /><br /><br />MohammedU.<br />Moderator<br />SQL-Server-Performance.com<br /><br />All postings are provided “AS IS†with no warranties for accuracy.<br /><br /><hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote"><br /><br />Wow, that’s the longest thread I have ever seen. [<img src=’/community/emoticons/emotion-5.gif’ alt=’

Yes, it is very long…. but we need go through if we need a solution…<br />good luck [<img src=’/community/emoticons/emotion-1.gif’ alt=’

]]>