I have a C# application that exports an Excel file. When I run it from Visual Studio, it is working fine. However, when I schedule it to run from SQL Server Agent, it failed
I tried this and it worked. I found "Microsoft Excel Application" is missing in DCOM Config. So, I did the following steps:
That's it. I ran the SQL job and it succeeded.