How to read excel data cell by cell column wise (horizontally)

Hi

How can i read data from excel and display message with this read data.

For ex,

I need to read the above sample data row by row and display the output as
1
Alex
Manager
Florida

Next move on to next row. How can this be done.

Thanks,
Mrudula

1 Like

string.Join(Environment.Newline, dataTable.Rows(0).ItemArray)

If Inside for each

string.Join(Environment.Newline, row.ItemArray);

Thank you vaidya!!!

It is working fine, but what exactly i need is to get each cell data one by one. The above expression outputs me single row data in the form of a list.But, what i want is when i repeat a loop it should display only 1 first time, Alex second time, Manager 3rd time…

Can you please help me out in this.

I tried using Assign activity, I got it. :grinning:

You can also try with nested for each activity. For reference see attached sample workflow.

//Output

Sample.zip (5.5 KB)

Regards…!!
Aksh

3 Likes

Thank You so much Aksh :slightly_smiling_face:

Aksh

How can we save all these into a list, to get each item based on the list index.

If you want to add items from one row to the List you have to put Add to collection Block into the second For each. But first of all you should initialize this List by using assign NewList = new List( of String/Object/whateveryouwnt) before first each.
am i right?

Hi guys,

I have created a basic bot , from which you can get values present in the excel cell vertically and horizontally. Hope it will help you all:).
Reading_Excel_data.zip (6.3 KB)

1 Like