so far I managed to download some data from SAP, wrote it in Excel and uploaded one column with InvoiceNumbers to a Datatable in UIPath.
Now I would like to perform for each invoicenumber of the data table some steps:
on a website (basically open website search number, and download the invoice) & save&rename the pdffile with the
respective invoice number. go to a sap transaction open the invoicenumber and add the invoice pdf…
Do that with all existing invoicenumbers of the datatable
I started with a for each activity but, it put all the invoices together in the website…
Now i dont really know how to continue.
Thanks for any hints how to continue
Would you mind sharing with us your xaml file ? So that we could understand what is blocking you
thanks for your answer! Not that much to share so far.
Adjust Excel Data.xaml (23.1 KB)
Alright, so what you are actually trying to type into is the whole datatable as a string, that’s why you are not getting the result expected.
What you really need is to type into only rows elements of the column called InvoiceNumbers, so you should do like this:
Yes that looks good, thank you
Any idea how I can save/rename each pdf with the corresponding invoicenumber?
You can use move file activitiy for this
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”:
Guys you are great!
Yes exactly, with clicking on the save button…
I think/hope it should work with your describtion, i will try!
Thank you Hiba
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
It’s better to use move file activitiy rather than going for UI 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.
@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
Here is connected topics:
Just some doubts:
Invoking this code I must to “exclude” automatically the HTTP request activity?
I suppose that red words are customizable parts. In my case the attachment name is a variable, not the extension.
Are there some other variables to declare?
Hello i am trying to send a pdf file with https request, it dont give me any error but the file aint uploaded, do anyone know the body syntax and head syntax for uploading a pdf file also if you know the approach for a image upload aswell i would be very happy
Thanks in advance
But Im sure, some forum experts would help you
Try with this example from “
Activity: Http Request
To get best out of this particular type of automation, i would suggest you to use Dispatcher and Performer concept.
Dispatcher will add your invoice numbers to queue.
Download data from SAP
Add data to queue
And performer will come into picture.
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
To download any pdf file you can use
Ctlr + P that will give you option to print file and save it as pdf
Ctrl + S that will save pdf
Can you see what I’m doing wrong? I get the error “row is no member of string” Thank you