'how to read text from notepad and save it to excel file in UiPath
Input from notepad: Name : Vineet Id : 123 City : Nod Name : XYZ Id : 987 City : ABC
Output I want: Name Id City Vineet 123 Nod XYZ 987 ABC
Output I 'am getting: Name Vineet Id 123 City Nod Name XYZ Id 987 City ABC
How solve this issue in Uipath ?
Solution 1:[1]
It's a bit hard to tell by how your question has formatted but the comment states you want to create a DataTable. I'm also assuming the data is written exactly as it appears in the question: "Name : Vineet Id : 123 City : Nod Name : XYZ Id : 987 City : ABC"
Set the Headers to your requirements.
Then do some formatting so Split into an Array
formatNotepad = notepadOutput.Replace(" :", ":")
personnelList = Split(formatNotepad, "Name:")
Use a For Each (set Argument type to String) Worth adding a IsNullOrEmpty step as the first row will be blank due to how the Split was done at Step 3.
Then use a Multi Assign to split the "Item" and obtain the details by getting the Index of the Array.
Then use the "Add Data Row" Activity
- Write Range using the DataTable
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |




