Application throws an error when launched from task scheduler

前端 未结 3 1788
时光说笑
时光说笑 2021-01-25 21:17

I have a custom application which uses Microsoft.Office.Interop.Excel.Application to open and save excel file. I have a batch which fires the app with all the required parameter

3条回答
  •  生来不讨喜
    2021-01-25 21:45

    I have found a solution here http://justgeeks.blogspot.co.uk/2012/10/troubleshooting-microsoft-excel-cannot.html

    the trick is you have to craete this folder:

    C:\Windows\SysWOW64\config\systemprofile\Desktop

    I must admit I do not quite understand why this folder is required for excel to open files when launched by task scheduler but it works.

提交回复
热议问题