I am a newbie in Uipath, and I appreciate your hints, advice or even solutions.
I have a word document (.docx) contains information about a new Employee. It is two pages long
with several fields:
First name: John
Last name: Doe
Social Security Number: 123145678
Address: Abcdef
xxx: abcd
yyy: efgh
So 2 questions:
How can I skip the fields “First name”, “Last name”, other fields and linebreaks?
How can I save their corresponding values “John”, “Doe”, etc. into string variables?
I need thesse variables so I can type them into our navision accounting system.
Thank you.
For splitting by New Line:
YourText.Split(Environment.NewLine.ToArray,StringSplitOptions.RemoveEmptyEntries)
Read the Word Document and store it in a variable WordOutput
To get John:
Jon=WordOutput.Split(Environment.NewLine.ToArray,StringSplitOptions.RemoveEmptyEntries)
John=WordOutput.Split(“First name”)
John=John(1).Split(“Last name”)
John=John(0).trim
My problem was when I converted word to text, I got so many unicode characters in the text document. There were several line breaks between fields and values. I had to make a parser so I could have my desire text format. After that, I followed your instructions and everything worked out well. Thank you both.