Read row by row (Excel)

Greetings,

I would like to make UIPath read row by row and convert it to text. However, the content was in column by column format. So when I use expression, row(1).ToString, the output will be row of that column. I want to make UIPath to list out like image below:

image

My Output should be = A, and then B, and then C, and then D, and then E. One by one through message box.

I only know row(1).ToString but it output = A ā†’ A2

Appreciate the helps.

Hi @DTECH,

Can you share what kind of output you want to get from the excel you shared?

Regards,
MY

Hi @DTECH

Can you please explain bit more.

Thanks

Hi, I have updated on main statement. The output should be A ā†’ B ā†’ C ā†’ D inside message box instead of A->A2

Hi, I have updated on main statement, sorry for not explaining in detail

thanks for the explanation.

Have you tried using outdatatable? It will return you all excel as strings.

image

Then when you split according to the new line, you will get each row as a string.
result.Split(Environment.NewLine.ToArray,StringSplitOptions.RemoveEmptyEntries)(1)

image

Regards,
MY

@DTECH Correct me if I am wrong. When you are looping through the first row instead of printing A,B,C,D,E in a message box you wan to print as A2, B2, C2 etc

No, I mean, I want to print A, loop again, print B, loop again, print C loop again D.
Once finish first row, it goes 2nd row, print A1, loop again, print B1

@DTECH

test.xlsx (8.2 KB)
test.xaml (7.8 KB)

in foreach row loop, use another foreach to loop over dt.columns
this will print
A->B->Cā€¦
A2->B2->C2ā€¦

output
image

Thanks, man, it was close but it print in one specific line now. Is it possible to print one by one ?

image

image

@DTECH Can you share your workflow here

image

Thanks for the attached but somehow mine cannot read

I believe there are better solutions, but Iā€™m sharing as a continuation. If you split your output again, you can list it as follows. @DTECH

image

If you increase your system activity the problem is solved. @DTECH

image

Here, sorry for misconfusion, the steps should just read one by one from left to right. So either A1 or A also can. The output should be A ā†’ B ā†’ C . If no more on first row, loop again to A1 ā†’ B1 ā†’ C1

Main.xaml (9.1 KB)
Book1.xlsx (8.2 KB)

Thanks a lot man, appreciate this expression. Cheers and thanks gain.

Thanks, I hope it will be helpful. @DTECH

Main (1).xaml (10.2 KB)

result
image

1 Like

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