I have an Excel sheet which contains data in one column for example
|1223-data#name|
|1235-data#name|
how to split sperate columns
Hi @silambu1605
Welcome to UiPath community buddy
- Us a excel application scope and pass the input as file path.
2 use a read range activity to get the output of type datatable named outdt - Use add datacolumn Activity and mention the datatable name as outdt, and column name as “Num”, to store the value 1234
- Use another add datacolumn and mention the columnname as “Data”
- Same again another add datacolumn and mention the columnname as “Name”
- Finally use a for each row loop and pass the input as outdt and inside use three assign activities like this
– in the first one
Lets say the above value is in column B
So the assign activity should be like this
row(“Num”) = Split(row(“yourcolumnname”).ToString,“-”)(0).ToString
Then in next assign activity like this
row(“Data”) = Split(Split(row(“yourcolumnname”).ToString,“-)(1).ToString),”#")(0).ToString
Then the last assign activity with this
row(“Name”) = Split(Split(row(“yourcolumnname”).ToString,“-)(1).ToString),”#")(1).ToString
Hope this would help you buddy
Cheers
2 Likes
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.