Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Can not save excel files through stored procedure on Server 2008

I have recently migrated a client from SBS 2003 with SQL 2005 to SBS 2008 and
SQL 2008.

They have some programs that are run via stored procedure using xp_cmdshell.
These programs each grab data from the database and put it into an excel
spreadsheet and save it to a directory on the server, unfortunately these
programs are now failing with the following exception:

System.Runtime.InteropServices.COMException was unhandled
Message="Exception from HRESULT: 0x800A03EC"
Source="Microsoft.Office.Interop.Excel"
ErrorCode=-2146827284
StackTrace:
at Microsoft.Office.Interop.Excel.WorkbookClass.SaveA s(Object
Filename, Object FileFormat, Object Password, Object WriteResPassword, Object
ReadOnlyRecommended, Object CreateBackup, XlSaveAsAccessMode AccessMode,
Object ConflictResolution, Object AddToMru, Object TextCodepage, Object
TextVisualLayout, Object Local)
at MailExceptions.Program.Main(String[] args)
InnerException:

If the program is run manually, that is double clicking on the icon, it runs
perfectly.

I have tried removing UAC in Server 2008, changing permissions on the
directory where the excel file is created, where the program is run, etc...

I was advised to ask in this community for help by the folks in the SBSC
managed newsgroups.

Any ideas on a setting within SQL, or the code, to allow this to run would
be much appreciated.

I don't think the problem is with SQL 2008, as I have installed SQL 2005
both 32 and 64 bit and the same problem persists with all versions.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Can not save excel files through stored procedure on Server 2008


Hi -

XL version would be helpful.

your xp_cmdshell calls are likely translating / casting whatever you are
passing in a "new" way not understood by your existing (and presumably
unchanged) XL app.

check version compatibility for the call in question between ss08 and what
xl you use.


"Cahill Solutions" wrote:

I have recently migrated a client from SBS 2003 with SQL 2005 to SBS 2008 and
SQL 2008.

They have some programs that are run via stored procedure using xp_cmdshell.
These programs each grab data from the database and put it into an excel
spreadsheet and save it to a directory on the server, unfortunately these
programs are now failing with the following exception:

System.Runtime.InteropServices.COMException was unhandled
Message="Exception from HRESULT: 0x800A03EC"
Source="Microsoft.Office.Interop.Excel"
ErrorCode=-2146827284
StackTrace:
at Microsoft.Office.Interop.Excel.WorkbookClass.SaveA s(Object
Filename, Object FileFormat, Object Password, Object WriteResPassword, Object
ReadOnlyRecommended, Object CreateBackup, XlSaveAsAccessMode AccessMode,
Object ConflictResolution, Object AddToMru, Object TextCodepage, Object
TextVisualLayout, Object Local)
at MailExceptions.Program.Main(String[] args)
InnerException:

If the program is run manually, that is double clicking on the icon, it runs
perfectly.

I have tried removing UAC in Server 2008, changing permissions on the
directory where the excel file is created, where the program is run, etc...

I was advised to ask in this community for help by the folks in the SBSC
managed newsgroups.

Any ideas on a setting within SQL, or the code, to allow this to run would
be much appreciated.

I don't think the problem is with SQL 2008, as I have installed SQL 2005
both 32 and 64 bit and the same problem persists with all versions.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Best way to call a SQL Server Stored Procedure from within Excel SQLScott Excel Programming 2 October 29th 08 06:00 PM
how to execute a stored procedure in SQL server from Excel 2007? smwikipedia Excel Programming 0 September 16th 08 01:17 PM
Run SQL Server stored procedure in Excel macro Peder Myhre Excel Programming 1 November 8th 05 10:54 PM
How to pass an Excel range as an argument to a SQL Server stored Procedure Belinda Excel Programming 7 April 8th 04 11:24 AM
calling a stored procedure on MS SQL Server within MS Excel 2000 Witold Domienik Excel Programming 0 March 2nd 04 10:47 AM


All times are GMT +1. The time now is 02:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"