Wait for data to be exported from SAP into excel


After I execute a transaction in SAP, I have to put the result in an excel file (File → Export → Spreadsheet) and then do a ‘Save As’ on the excel file with F12. When the data is exported from SAP an empty excel file is opened and the Excel application is unresponsive while the data is being written in the file. The problem is I don’t know how to tell when this transfer is finished so I can hit F12. If I hit F12 while the data is being written it doesn’t bring up the Save As window.

I somehow need to know when the data has been fully loaded into the excel file. Any suggestions?

Much appreciated!

1 Like

Does pressing F12 before it is ready affect the workflow in a negative way?

If not, you could put an element exists activity as the condition within a retry scope, and just have a fairly short retry interval (every 1 second or so). Then set the max retries for however long you want to wait. The action portion would be either a type into or send hotkey activity that just presses F12

I’ve dealt with this recently.

Instead of exporting to spreadsheet (which takes ages with SAP) have you considered copying the report to clipboard and then pasting it into a new spreadsheet?

File - Export - Local File - select ‘in the clipboard’

Or hotkey Alt-Shift-F9 brings up the window where you can select ‘in the clipboard’.

That would also negate your need to F12 and save as, the selectors for doing this can be problematic. You could create a new excel file with the excel application scope instead and name it whatever you like, in whichever directory you like.

Once you paste the report into excel it will need to have ‘text to columns’ applied. I created a macro to paste and split the report into the correct format, it was straightforward as I just used the recorder :stuck_out_tongue: Needs a bit of cleaning up but its a million times faster than waiting for SAP to export it.

Hope this helps!


Hi Dave. I was thinking about this but I would like to avoid pressing F12 repeatedly if possible.

Thanks for the suggestion, KEntwistle. The export doesn’t take that much time (at least in my specific case), it’s the actual execution of the transaction that is brutal time-wise. I’ll try to see if copying to clipboard and then pasting in excel works for my scenario and come back. Also, there’s a lot of data that needs to be pasted in this excel (north of 15k rows) and I’m wondering if there’s a memory limit for the clipboard, although I’m guessing this shouldn’t be a concern.

I’ve tried it but it seems like too much trouble for what I want to accomplish. For one I would like to avoid using macros. Then there’s the data format that I would need to set for each column before clicking Finish on the Text to Columns option (say, if the format is set to the default ‘general’ format values like 0019 will be turned to 19 when I want them to remain 0019). I’ve also noticed that the order of the columns is different after applying Text to Columns. Thanks for the suggestion though, it might come in handy in the future.

Well, I’m ashamed. A colleague pointed to me that after the data is loaded in the excel there’s a sap window that appears.


I didn’t notice it because it was behind the excel file and I assumed it appeared before the data is loaded but it actually appears after. So I can wait until this window appears to hit F12 and save the excel file.

I noticed that if I press enter on this window it closes the excel file. I’m assuming it saves the file but I don’t know where.


Hi Guys!

Am new to UiPath, I need to download reports from SAP.

Can anyone help me how to automate this one ?

Hi krishvik,
In which format do you need reports? Just a text document for Clik reports or downloads in Excel? :slight_smile:

Hi, I need to download EXCEL report from SAP using Tcodes, if u share any workflows related to this it could be very helpful.

1 Like

I only have a txt format for Qlik if it helps you :no_mouth: