Convert text to excel

Hi all,
I have a text file and I need to conver it to excel.

My text file consists of the below data
Name|Date|Time|Sol ID|Remarks

So in my excel I want header as Name Date Time Sol ID and Remarks

And under name xyz should display and under date 21-05-2022 should come and under time 16:24:20 must come and under Sol ID column 7654 should come and under remarks success must display.

Please help me how to go with it

Hi @hanviprebday

Have you tried woith Generate data table activity?

Hi @hanviprebday

Read text file
Use Generate Datatable from text activity

Hi @supriya117 my generate data table looks different

Hi @hanviprebday

Copy this text and paste in sample input

Name|Date|Time|Sol ID|Remarks

and then click on preview


Copt and paste the text in the sample output wizard and click preview to check the data is converting to datatable correctly or not.

Hii @hanviprebday

Try this workflow

  1. Read Text File

    • Output: textFromFile
  2. Create Data Table (DT)

  3. Assign

    • TypeArgument: System.String
    • Value: textFromFile.Split(Environment.NewLine.ToCharArray, StringSplitOptions.RemoveEmptyEntries)
    • Output: lines
  4. For Each

    • TypeArgument: System.String
    • Values: lines

    - TypeArgument: System.String
    - Value: item.Split(","c)
    - Output: columns

    Add Data Row
    - DataTable: dt
    - DataRow: columns

  5. Write Range

    • DataTable: dt


Hello @hanviprebday
Kindly refer to the Xaml file, it will heps you. (148.5 KB)

But my generate data table doesn’t have the format option


Upgrade or Downgrade UiPath.System.Activities package


It’s just the variations of system activities package version. What you have placed is correct. Check with that settings. If the output varies then we can change the properties.

Ok I am using 20.10.4 which version should I use


Try with latest version

Ok thank you all, it’s working for me

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