Hello, I am new to UiPath DesignX and I am struggling with a project to fill a PDF form using data from multiple excel rows. I went through the tutorial provided by UiPath and was able to successfully fill a pdf from excel data but the way I need it done is a little different.
I have an excel sheet that has 700 rows of user data based on property issued (laptops, monitors). Some users only have one row to their name and other users have 2-30 rows to their name. I need to be able to “Type into” specific fields in a PDF their name and the multiple rows of data found in the excel sheet. I can get it to perform one row with no problem but I can’t figure out how to get it to continue going down the rows to see if that user has any more property. My example shows Jim Parson, I can fill the form with the first row of data but I need it to fill the form with all data found for Jim Parsons. I have spent close to a week trying everything I can think of or find in forums with no success. Any help is greatly appreciated! Thanks
It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.
First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.
You can check out some of our resources directly, see below:
Always search first. It is the best way to quickly find your answer. Check out the icon for that.
Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.
Topic that contains most common solutions with example project files can be found here.
Read our official documentation where you can find a lot of information and instructions about each of our products:
Meet us and our users on our Community Slack and ask your question there.
Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.
Thank you for helping us build our UiPath Community!
Are you able to provide some clarity on what you need to accomplish? Are you trying to fill in fields on the same pdf for each unique user or are you creating a new pdf for each piece of property? In other words, would Jim have one pdf that has entries for the computer and monitor or would there be one pdf for the computer and another pdf for the monitor?
Are you able to share a snip of the form you are trying to fill from the Excel?
Hi Heathera!
Thank you for the reply. Yes, I am trying to fill in fields on the same pdf for each unique user. So Jim would have one pdf for all equipment which each item on one line under Item Description.
I was afraid of that. It would be simple to create a pdf for each piece of equipment by using the For Each Row in Excel activity and have the bot fill in the form and save it for each row from the Excel.
My suggestion would be to create a new excel or clean up the formatting of your existing excel such that each unique employee only has one row and there are columns for Item Descriptions. To accomplish this, I would do the following:
Do a join to combine the cell values from Type, Make, Model, and Serial Number to make the description. (In your file it would look like this: =C2&““&D2&””&E2&“_”&F2 and the result would be something like Computer_HP_G5_aesdrf63587463)
Add columns for the Item Descriptions and have as many columns as are needed so that each employee has all items listed in separate columns. Then remove the rows that were duplicates based on the old format. Looking at your above Excel snip, the new one would have 4 columns: USER, EMPLOYEE ID, ITEM1, ITEM 2 and there would be 3 rows: Jim, Aaron, Ryan. Item2 would be blank for Ryan but would have values for Jim and Aaron.
You could then have the bot use the Item1 to Type Into the first row on the pdf, Item2 to Type Into the second, and so on.
You would then use the For Each Row in Excel to complete the pdf form for each unique user.
Hope this helps-I’m new to this so I may not have the most optimal solution, but it would work.
That is a great idea, but I have a couple questions. Would I use an If/Then statement to check next cell (item2+)? How would I tell the automation to move the next item in the row to next line on the form if it varies (1 item - 30 items)?
Thank you for your reply! Based on the description for PDF Forms Activity Pack, is this just to read and modify PDF forms or can I also accomplish the task of filling out the forms using variable data from an excel spreadsheet?
I was able to merge all data into one row for each user using a VBA script. Now my data shows 1st Column: UsersName, 2nd Column: FirstProperty, 3rd Column: SecondProperty, 4th Column: ect.
Do I need to use an Else If statement to move to check next column to determine next activity step?
It’s hard to tell exactly what to do without seeing the actual form, but yes, you would likely need some If/Else logic to tell the bot when to keep adding rows to the current form and when to use a new form.
Thank you for your reply. I did create IF statements to check next cell in current row if it is empty. It worked exactly how I wanted! Thank you for your assistance!