Word Information to Excel

I have data separated by a comma saved in a word and I want to read it to separate it into an excel table


Could you give us a bit more details like each comma seperated values should be different rows or columns?

If each value should be different rows, do the following:

  1. Read the word file and store in a string.
  2. Create a datatable to store the data.
  3. Use a for each and loop through this: Split(WordText,“,”). The type argument should be string.
  4. Inside for each loop, use Add DataRow activity and add the item.
  5. After for each loop, write the datatable to the desired excel file.

Hope this helps!

1 Like

how to read the word file? using word application scope??


Give a try with word package

Go to design tab → manage packages → all packages-> search as UiPath.Word package and install it

Cheers @Diana_Garcia1 @guptasweb

hi i m getting an error while adding a data in the below screenshot


Have you created a datatable before trying to add the row ?



Did you create DataTable before adding data to it using Add Data Row activity ?

If not then use Build DataTable activity to create new DataTable named dtInput with all the required columns and then add data to it using Add DataRow activity.

yes,i have created
information.xaml (10.2 KB)
have a look

Please pass the variable “Empty_DT” and run again, as your datatable name is Empty_DT.
Also, I can see that you are looping through a string- not an array. Can you please explain what you are trying to achieve? And if possible, please provide the sample word data you are using. You can create a new thread for these questions.


I want to copy the word data into excel file

i have created so many times but no one reply there

Hi @Diana_Garcia1 ,

Could you provide us with a Sample of your Data to understand the format of the Data to Extract?

Most probably, we would require to use String Manipulations/Regex to achieve your desired Output as you have mentioned the Data is Separated by Comma’s.