Make sure the task is set to "Run only when user is logged on".
Full explanation: There are 2 types of Windows programs, command line (console) programs like icacls.exe, and graphical (GUI) programs like Excel.
If you have a requirement to "Run whether the user is logged on or not", then you should only execute command line (console) programs. I refer to this as "unattended execution".
The issue is that GUI programs expect to interact with a desktop user who can "click on OK to continue" message boxes. If the task is set to "Run whether the user is logged on or not", the desktop user has no access to the GUI. There is no way to click on anything. There is no way to "see" the window that the program produces. About the only thing that you can do is to use the task manager to see if the program is running and force kill any instances.
Command line (console) programs work well for unattended execution because you can capture stdout and stderr and see what messages a program produces.
See my answer to this question.
Graphical (GUI) programs like Excel should be set to run only when the user is logged on. That way the program will be visible to the desktop user and can interact with it. If Excel can't find your .xlsm file, then it should show an error message.