Scheduled Jobs Fail with an "Unable to Cast COM Object" Error
Summary
When Jet Scheduler jobs fail and the scheduler log shows an “Unable to cast COM object” error that mentions Microsoft.Office.Interop.Excel, repairing the Microsoft Office installation on the computer that runs the scheduled jobs resolves the error.
Symptom
Scheduled Jet Reports jobs fail, and the scheduler log shows an error similar to the following:
Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type 'Microsoft.Office.Interop.Excel._Application'. ... Element not found. (Exception from HRESULT: 0x8002802B (TYPE_E_ELEMENTNOTFOUND)).
The error is raised while the Jet AutoPilot process starts Excel. Reports that run from the scheduler do not complete, and the scheduled output is not delivered.
Cause
The Microsoft Office installation on the computer is damaged or incomplete. When Jet starts Excel through COM, Excel does not respond in the expected way, so the connection fails. Repairing the installation restores the components that Jet uses.
Resolution
You need administrator rights on the computer that runs the Jet Scheduler jobs. The repair takes a while and requires an internet connection.
- Sign in to the computer that runs the scheduled Jet Reports jobs with an account that has administrator rights.
- Open Add or Remove Programs. On Windows 10 and Windows 11, this is named Apps & features.
- Select the Office 365 entry, then select Modify.
- Select Online Repair and follow the prompts to start the repair.
- Wait for the repair to finish, then restart the computer.
Verify the Fix
Run one scheduled job or wait for its next scheduled run. Confirm that the job completes and the output is delivered. Check the scheduler log for new entries. The COM error should not appear.
Troubleshooting
| Symptom | Fix |
|---|---|
| The COM error continues after the repair. | Confirm that the scheduled job runs under the same account on the same computer that you repaired. Then contact Support and include the Jet Reports version, the Microsoft Office version, and the full error text from the scheduler log. |
| The repair option does not appear in Add or Remove Programs. | Confirm that Office is installed on the computer. If the entry is missing, contact your administrator. |