How to Replace Word Text by Excel Data

I have one Excel (Input File) and one Word output Template .i want to replace all the text from the word file with the excel input file and save the file on the basis of “CONTACT NAME”.But One Condition is there if there are more than one same CONTACT NAME then all things are same only Invoice No., Invoice Date, Your Purchase Order No., Amount these things are updated on the basis of there value.Just see all three files.Result File Will be saved By Conatct Name if one or more Same Contact Name then just save the file in one word file.
OUT Template File is a word File Not Pdf also Result File also Word fileFinal Result.pdf (157.1 KB) Output_Template.pdf (67.7 KB)
Bot_Input.xlsx (11.6 KB)

You should read your variables from your excel into a datatable, then, import them to your word file by setting your template up with appropriate bookmarks.

should be simple enough to do:

https://activities.uipath.com/docs/word-set-bookmark-content

1 Like

hi @ronanpete how i put the data for invoice no., Invoice Date, Your Purchase Order No., Amount for the same person if he has two or more rows please guide me I am stuck at that place

Once you read the data into a datatable, remove the duplicates based on the names column before moving to the for each loop where variables are input into the word document.

hi @ronanpeter here is my work flowSequence.xaml (21.5 KB)

So you have your datatable. You need to insert an activity to remove the duplicates and outputing to a final datatable before moving to populating word files. So you have a final dataset to work with that is. It should go here:

hi @ronanpeter but why removing duplicates from data table,

"But One Condition is there if there are more than one same CONTACT NAME then all things are same only Invoice No., Invoice Date, Your Purchase Order No

Unless I have misunderstood this you want to only input a contact once, by removing duplicates you will have a dataset you can work with.

hi @ronanpeter can you see the template files and result file

Yes, so for Tony Smith do you want to have two letters created or one? I have assumed one even though he appears twice in your source data.

@ronanpeter yes you are write I want tony smith data once but for tony smith four column data from exccel i always want .(Invoce no,invoce date).I am facing problem with table because there is table in the word file i want to put the data in the table according to the column name from excel and Officer name and client name is also problem because they are in bracket how i can repalce with data

two

This sequence will help identify the rows in your data where ContactName occurs more than once, and places these in an array of CustomerNames.

You can now distinguish between those names which do occur more than once in your data and those that don’t. You can therefore perform the relevant actions on each set.

Main.xaml (12.7 KB)