Applicable Versions: All Versions
The ""Bad file mode"" error has been known to occur occasionally when
a) two reports are being generated at the same time,
b) if there is a file lock arising from a failure in the creation of an excel file following an internal excel error.
In scenario b) with the excel creation error, an excel task is left running holding a lock on a file, this lock needs to be cleared before another scheduler can write to a file.
The existence of these orphan excel tasks can be seen in the Windows Task Manager.
A DataPA_Sched.exe (which is the process that runs a scheduled task) process may also be left hanging.