For anyone who has this issue in the future: it is possible to run Interop with a non-interactive task. I was able to make it work tweaking CSOM settings. Here are the steps:
A new window will open. Now follow the steps below to configure permissions:
General Tab:
Ensure that Authentication Level is set to Default. Security Tab:
Under Launch and Activation Permissions, click Customize and then Edit.
Add the user account that runs the Task Scheduler job and grant it the following permissions:
Local Launch: Allow Remote Launch: (only if you plan to run Excel from another machine) Local Activation: Allow Remote Activation: (only if running from another machine) Under Access Permissions, click Customize and then Edit.
Add the user or service account running the task and give it access permissions as needed. Identity Tab:
Here, choose how you want Excel to run. You have three options: The interactive user: This runs Excel only when a user is logged in. The launching user: This runs Excel using the user who launches the task. This user: You can specify a specific user account (provide username and password) to run Excel. If you want Excel to run as a background task, choose This user and provide the credentials of a user that has the necessary permissions.
Open Services (press Win + R, type services.msc, and press Enter). Find DCOM Server Process Launcher. Right-click and select Restart.