Skip to main content

Problems Converting using Excel in a Service (interactive user)

Interactive user is unable to convert using PDF2XL

Written by Team PDF2XL
Updated over 8 months ago

The probable cause of this behavior is that Office applications are designed to work only with interactive user accounts; i.e., accounts that have a desktop and can show a window.

Usual service accounts are not interactive.
​

Here's a Microsoft reference about the issue: https://support.microsoft.com/en-us/help/257757/considerations-for-server-side-automation-of-office (the page mentions "server side" issues but the same information applies to applications run as services, or launched by the Task Scheduler).
​
There are a few tweaks that may solve the issue, such as the ones found here (https://superuser.com/questions/579900/why-cant-excel-open-a-file-when-run-from-task-scheduler)
and here (http://stackoverflow.com/questions/4234615/excel-com-automation-stops-working-when-user-logs-off), but the simplest option would be to set an actual user as the service account.
​
To verify that this is actually the issue you are facing, you can create a simple script in VB using Excel automation (Excel.Application class) and test it in your service. The call should fail silently, as it is happening when calling PDF2XL.

Another option would be to use another format as an output, such as CSV.
​

Did this answer your question?