Export SAP Reports to Excel File

I have a process that exports SAP reports to Excel. the export works fine. the issue is that SAP opens Excel after saving the file. I use the Kill Excel activity to close Excel. but Excel takes to long to close and I get a timeout. I’ve tried extending the timeout to 15 seconds, but this doesn’t help. It is not an option to change SAP settings to prevent Excel from opening.

When I run the process in attended mode, the issue almost never happens. But when I publish to Orchestrator and have a bot run the process, this issue happens every time. The bot runs on the same VM used when running in attended mode.

That leads me to two questions:

  1. is there a best practice for closing Excel after it has been opened by another process (like SAP).
  2. Is there a way to determine if there is a problem (e.g., performance) with robot/job that is run through Orchestrator.

I do not know what report/transaction you execute, but SAP usually leaves excel report open and asks user to save it, but when you confirm in SAP it was done report will be closed.
But whatever, you can use SAP Scripting/VBA to support this part of workflow, script will always wait for all actions (save, close) on report to be executed and there shouldn’t be timeout in UiPath on ‘Invoke VBA’ activity.

Additionaly set screenshot to be taken when you run on VM from Orchestrator, this will help you better understand what’s happening there.

Hi all.
I get the Timeout Exceptions on this activity and looking for a way to prevent it.