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


#1

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


#2

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

If Inside for each

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


#3

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.


#4

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


#5

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

//Output

Sample.zip (5.5 KB)

Regards…!!
Aksh


Read cell by cell in row data
How to read excel sheet cell by cell
#6

Thank You so much Aksh :slightly_smiling_face:


Read column if msgbox input matches with row
#7

Aksh

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


#8

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?


#9

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)


#10