Separate each row from excel sheet

How to separate each row from excel sheet and write into different text files?

Hey @Farook1,

Welcome to the UiPath community !!.

Use Excel application scope and read range activity to read the excel data in the in memory datatable and then iterate the datattable using foreach row.

Inside foreachrow you can use write line or appendline activity to write the excel row data to text file.

1 Like

@Farook1,

Read the excel and store in data table. Use for each row to loop through each row and

  1. get each column value as row(“Column1”) and row(“Column2”) and so on…
  2. Use string variable and concatenate each value you got in for each row and write it to the different files

Hi buddy @Farook1

Welcome to uipath community

Its resolved, here you go with the xaml
rowtotext.zip (28.4 KB)

and the steps involved are
–use excel applicaton scope and pass the file path as input
–use read range activity and get the output with the variable of type datatable named outdt
–use for each loop and pass the input as outdt.Rows and change the type argument property in the for each loop as Datarow
–inside the for each loop use a write text file activity and mention the filename as
"Row"+"_"+Counter.ToString
where counter is a variable of type int32 with default value 1
–next to this write text file activity use a assign activity to increment the counter value
like this
Counter = Counter + 1

Thats all buddy
Hope this would help you
Kindly try this and let know for any queries or clarification
Cheers @Farook1