Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Save ouput of Stored Procedure to excel file
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

2 Posts

Posted - 07/25/2013 :  00:17:33  Show Profile  Reply with Quote
Good Morning,
I am trying to save the output of a stored procedure in excel file, i am using following code

'Data Source=d:\book1.xls;Extended Properties=Excel 8.0;')...[Sheet1$]
exec rptworkorderstatus2 ''

but i am getting this error :
The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" does not contain the table "Sheet1$". The table either does not exist or the current user does not have permissions on that table.

Plz Correct me,thanks

Edited by - NehaSharma on 07/25/2013 00:25:48

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 07/25/2013 :  00:45:48  Show Profile  Reply with Quote
is excel file in use? do you've access to the path?

SQL Server MVP
Go to Top of Page

Flowing Fount of Yak Knowledge

United Kingdom
2179 Posts

Posted - 07/25/2013 :  01:50:29  Show Profile  Visit jackv's Homepage  Reply with Quote
Check the file exists and and you have privileges.
A different method to export from SQL Server is to use Powershell , which does give you a fair bit of control -

Jack Vamvas
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000