For each row of a datatable

Yes that looks good, thank you :slight_smile:

Any idea how I can save/rename each pdf with the corresponding invoicenumber?

Hi @Markus3003

You can use move file activitiy for this


Nived N :robot:

Happy Automation

1 Like

Sure ! How do you trigger the saving of the file ? Is it through a button ?
To rename a file already locally saved in your computer, you can use “Move File”:

1 Like

Guys you are great! :slight_smile:
Thank you!!

1 Like

Yes exactly, with clicking on the save button…


I think/hope it should work with your describtion, i will try!

Thank you Hiba :slight_smile:

1 Like

Oh then you should directly write the right file name, without using move file activity !
In the Dateiname, you should type into:
folder path + "\" + row("InvoiceNumbers").tostring+".pdf"
and that’s it

1 Like

Hi @Markus3003

It’s better to use move file activitiy rather than going for UI Automation


Nived N :robot:

Happy Automation

Gosh, could you also tell me whats the best way to download the pdf from web?

UiPath is not recognizing the printer or download button in my case. :confused:

Thank you

@Markus3003 - You can use Either UiAutomation or Http request to download the pdfs…

You can also use Send hotkey activity with shortcut: Ctrl+Shift+s and then type into path with file name with extension. Last would be enter key for saving.

But API surely would be much faster.

If not downloading through API, you can click the download symbol and make sure to toggle the “Ask where to save each file before downloading” in Chrome download settings so the Save As window is shown.

Exactly, and to illustrate it you use Send Hotkey activity:
Beware of your selector, so that it fits different pdf

@Yameso would you mind explaining in details the API way ? I am interested to learn about it

I would love to but Im still begginer in that case :wink:

Here is connected topics:

But Im sure, some forum experts would help you :slight_smile:

1 Like

Try with this example from “”

Activity: Http Request


Hey Markus,

To get best out of this particular type of automation, i would suggest you to use Dispatcher and Performer concept.

  1. Dispatcher will add your invoice numbers to queue.
  • Download data from SAP

  • Add data to queue

And performer will come into picture.

  1. Performer
  • Get transaction item (one invoice number at time)
  • Download PDF and perform operations on SAP
  • update progress of invoice
  • Move to next invoice

This way it is easy to track, debug and avoid unnecessary loops and conditions.

To rename a file, use file system, this will help you FileSystem.RenameFile("C:\Test.txt", "SecondTest.txt")

To download any pdf file you can use
Ctlr + P that will give you option to print file and save it as pdf
or use
Ctrl + S that will save pdf

Hi @Hiba_B ,

Can you see what I’m doing wrong? I get the error “row is no member of string” Thank you :slight_smile:

here is the code:


I think that what you want is rather:
"C:\Users\...\".Replace(Path.GetFileName("C:\Users\...") + row("Referenz").ToString))
→ don’t forget the last parenthesis and to exchange the “.” into “+” between your path and the row()

1 Like

It you want to replace text (folder) with value in row cell “Referenz” it should be:


in () there should be comma, beetwen two strings.


You’re definitely right, missed it :joy:

1 Like