Alex Lum
Alex Lum

Reputation: 307

POWERSHELL on scheduled task : windows server 2019 and excel 2013

Had an issue with excel 2013 invoked with scheduled task via powershell. I added "Desktop" directory on C:\Windows\SysWOW64\config\systemprofile. (for 32 bits too)

Now i can read excel file but i can't save excel file. Windows server 2019. Excel 2013.

It was working on 2008 R2. Thanks for help.

Upvotes: 0

Views: 656

Answers (1)

Alex Lum
Alex Lum

Reputation: 307

Ok, I've found a trick.

Microsoft said that automation on server side is not supported by devs. https://support.microsoft.com/en-us/help/257757/considerations-for-server-side-automation-of-office

Solution is here : https://social.msdn.microsoft.com/Forums/office/en-US/66afe200-0bff-41f5-a2ca-e43007ad8f31/excelapplication-powershell-script-error-running-from-scheduled-task?forum=exceldev

Open comexp.msc. Navigate to DCOM config and find Microsoft Excel Application. Right clic and properties enter image description here

Identity tab >> This user and choose a user who has a profile on this computer.

enter image description here

You do not need Desktop folders on systemprofile dirs.

Upvotes: 0

Related Questions