Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
Installing service reminder popup windows in excel Scotty Excel Worksheet Functions 0 April 22nd 10 05:48 AM
can not save spreadsheet from a windows service on windows server dragonemp Excel Programming 2 November 3rd 08 03:48 PM
Problem deploying an automation addin (VS2005, Windows XP SP1, Excel XP) BlueTrin Excel Programming 1 June 6th 06 11:29 AM
what service pack do I have with my windows 2000? Crystal Excel Discussion (Misc queries) 2 April 18th 06 02:44 PM
Automation error -2147417848 on windows 98 while using excel in VB ( works fine in XP) Sudhanshu Jain Excel Programming 1 November 5th 04 04:41 PM


All times are GMT +1. The time now is 05:16 PM.

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"