I have a couple of issues with what I’ve attached. I’ve attached the UI Path project I am working on and I’ve also attached the data table and the Excel template.
The first three pieces of this project work fine
1.Open DS LOA Ishare
2.Data scraping
3. Excel - save the table
Once I’ve saved the data table I’m using a for each loop to iterate through it and pull out each waybill number (the variable is “awb” without quotes).
The problem I’m having is that I can’t get the For Each loop to work correctly. The For Each loop is supposed to pull each awb and paste it into cell F8 of the attached Excel template (called DS LOA template) and then save it as a PDF with the awb variable as the PDF name. For example, if the first awb is 123456789, the first saved template would similarly be named 1234567899.pdf. Right now it saves the first only but the file name is awb.pdf. The other issue is that the for each is pulling the wrong column of data. Instead of pasting the awb variable it is pasting the column with the employee names.
Can someone take a look and help me? I feel like I’m close but not close enough
Thank you very much! This is a big step forward. It appears to be opening the template and I can see it pasting in the waybill numbers but it is then saving the template with the same name instead of saving as the name awb + “pdf” or awb + “xlsx”. How do I correct this? If PDF isn’t an option then I can save as Excel but how do I do that? And how does saving as a PDF corrupt the file?
Thanks again for your help.
Hello again,
I did some digging and it is saving the files with the correct file names but it is saving them in the UI Path directory where the project resides. The problem is that the files are all corrupted. Is there a fix?
The files are corrupted because you can’t directly convert .xlsx to .pdf files.
You will have to do that manually or use screen recording to save as each file.
Also tag me with @ so I get notification else its tough to track.
Is it possible to use screen recording to save as PDF with a variable? I need the file name to be the variable strAWB and that changes each time. Also, an analyst friend of mine suggested using Key Down but I can’t find it in UIPath. Is that an option?
@kunalj - Thank you, my error - Key Down is actually a Click Text activity with a Click Type of Click_Down and I’ve set the occurrence field to 24 to go down 24 times to where the PDF resides. Your way seems easier so I’ll try that. Thank you again
@mworth123 Yeah type into activity is much easier and faster. And if this works out for you, mark any of the replies as your solution so if someone refers to it, knows that this thread is resolved.