Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel automation from a Windows service
Hi, I have a service (written in C++) that periodically opens up an
excel spreadsheet, re-calculates the values, saves it to a new location and then prints it. This all worked pretty well on Windows Server 2003 with Office 2003, but on Windows Server 2008 with Office 2007 I get the following error when I attempt to open the excel spreadsheet: Microsoft Office Excel cannot access the file I have done a bit of searching on the net and found that changing the dcom Identity information of the Microsoft Excel Application to anything other than "The launching user" resolves the problem but unfortunately it causes a bunch of new problems. If I change the identity to "The interactive user", the service works well but only if someone is logged onto the OS which I guess is to be expected as once no one is logged on to Windows there is no "Interactive user". If on the other hand I change the identity to "This user" and specify the user that the services runs under (local user) then the service works well regardless of whether someone is logged on to Windows or not. But it is no longer possible for the user to use Excel manually. Whilst both of the above options are improvements over nothing working, neither is ideal. During my reading I found an article detailing alternative methods (http://www.kbalertz.com/Feedback.aspx? kbNumber=257757) to excel automation. But none of them seem applicable to what I am trying to achieve. Does anyone have any suggestions on how to get my current service to run regardless of whether anyone is logged on to Windows, whilst also allowing Excel to be manually operated by the user? If not I am open to alternative solutions to achieve my goal (periodically open spreadsheet, re-calculate, save to new location). Thanks very much for any help you can provide. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Installing service reminder popup windows in excel | Excel Worksheet Functions | |||
can not save spreadsheet from a windows service on windows server | Excel Programming | |||
Problem deploying an automation addin (VS2005, Windows XP SP1, Excel XP) | Excel Programming | |||
what service pack do I have with my windows 2000? | Excel Discussion (Misc queries) | |||
Automation error -2147417848 on windows 98 while using excel in VB ( works fine in XP) | Excel Programming |