Symptoms

When running a script that automates an Excel workbook, script methods fail with error "Call was rejected by callee." Depending on your programming environment, this may be error code 0x80010001, -2147418111, or RPC_E_CALL_REJECTED.

More Information

There are many possible causes for this problem, none of which are directly caused by adTempus.

One possible cause is that Excel is displaying a dialog box and waiting for a response from the user. Try running your script/code outside of adTempus so that you can see whether a dialog is being displayed. Alternatively, log in to the adTempus server using the account that the job runs under and change the User Interaction setting for the job to "Interactive required," then run the job. This will allow you to see any windows displayed by Excel.

A customer has recently encountered problems after Excel was updated to version 16.0.16626.20170. Following this update, scripts automating workbooks that use Power Query intermittently failed with the referenced error. Upon running the script outside of adTempus, the customer found that Excel was frequently displaying a "Your privacy matters" consent window when the script attempted to perform operations in the workbook, causing the script to fail with the referenced error. All attempts to suppress this prompt using Registry and policy settings have been unsuccessful. This behavior was not present before Excel was updated.