Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bit of an odd one, but I cannot figure out why the Workbooks.Open command
produces an exception (see below) only when the command is run from a windows service running on Vista. So far I have discovered the following: 1. Its not version specific to Exel, I get the same result on version 2003 and 2007. 2. I can "see" and fully access the workbook from the service. I've done a few tests involving using Shell to launch Excel with the workbook as well as creating new files from the service, which both worked ok. 3. Ive tried late binding to the Excel application and invoking the Open method, same exception. 4. I've verified that my code is working ok in a console app. From looking up on the internet the exception is quite a generic one, as in "something hasn't worked, i'm failing now", but heres the exception: System.Runtime.InteropServices.COMException (0x800A03EC): Microsoft Office Excel cannot access the file 'C:\TestExcelService\Test_Excel.xlsx'. There are several possible reasons: €¢ The file name or path does not exist. €¢ The file is being used by another program. €¢ The workbook you are trying to save has the same name as a currently open workbook. at Microsoft.Office.Interop.Excel.Workbooks.Open(Stri ng Filename, Object UpdateLinks, Object ReadOnly, Object Format, Object Password, Object WriteResPassword, Object IgnoreReadOnlyRecommended, Object Origin, Object Delimiter, Object Editable, Object Notify, Object Converter, Object AddToMru, Object Local, Object CorruptLoad) If anybody has any ideas on how to fix this I'd really appreciate it. Thanks Mark |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
duplicate workbooks open while working in that file | Excel Discussion (Misc queries) | |||
Merge Sheets not working in Vista | Excel Discussion (Misc queries) | |||
Workbooks.Open(URL) not working | Excel Programming | |||
Problem with Macro working in new workbooks that I open | Excel Programming | |||
Excel 2003 Workbooks.Open with CorruptLoad=xlRepairFile fails on Excel 5.0/95 file due to Chart, with Error 1004 Method 'Open' of object 'Workbooks' failed | Excel Programming |