I created a console application in C # to read an Excel file. Used microsoft dll dll to manage excel file. An excel file is created in Excel 2013.net version 4.5 OS: Windows Server 2012
It will open the excel file and add a string sheet with values.
Functionality is working fine. But when I configure exe in the task scheduler, I get an error message.
Retrieving the factory COM class for a component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
I also tried running exe on the command line with the same user credentials that were used to configure the task in the scheduler.
My question is: exe works fine on the command line, but doesn't work on the task scheduler.
Any thoughts ??
source
share