Unable to read a work document using read text file activtiy

Hello Fellas,

I am new to UiPath and trying to read a word document using read text activity and writing the text in another text file

While reading the text system shows error

"Source: Read Text

Message: The process cannot access the file ‘C:\Users\tg3067\Documents\Defect Log.docx’ because it is being used by another process.

Exception Type: System.IO.IOException"

Please help to resolve the issue.

Close the file “Defect Log.docx” and try.

The File which you access should not be in open .

I tried that… but still facing the same

Try creating a new file and test it once.

Close the process in task manager once.

The error is related to access issue.

Let me know if you still face issue . we will investigate further

1 Like

It happens when the some docx is open. Kill All the Word process for the Current user id and then try to read the Word.

1 Like

no process related to word was currently running.

I don’t know how, but its working fine now:P

Could you help me to, “read each line of the word document and split based on the delimiter (”:“) and write the text on the other text file”

Say for example, if i have multiple lines like,

Emp Name : ABC
Emp ID : 123
Emp Desgination: ASFD
Supervisor : FGH

In this i want to write ABC, 123, ASFD, FGH in another file. how to split and write.

Thanks, I have another query which i tagged in another comment. Could you please look into that

  1. Read the text file and store it as a string

  2. Split as each row of lines like
    YourString.Split(new String() {Environment.NewLine},
    StringSplitOptions.None)

  3. Now loop list of lines and split with (“:”) and extract the data

2 Likes

Thanks dude

Welcome :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.