Data Table


#1

I want to read row of dataTable and after every row it should give me a message . how to do that ? i was able to read the whole datatable but cannot able to show message after every row . i was able to show the whole data Table in the message box


#2

you can use the activity ‘for each row’.


#3

Hi @shivamrana,
I guess you are using the activity “Output Data Table” in order to see what is the data inside the data table. This activity will give the whole data in a single message box as string.
If you want to iterate and see the values one by one then, as @Vinutha suggested you can use the for each row activity and inside that according to your need you can display a message box or write line activity.
In order to enhance you can write this data one by one to any application if you keep your activity inside that for each row loop.
Hope you are clear. :slight_smile:


#4

Hi, I have used the above write line example to read just one row from my datatable. Yet my Output shows nothing.
However when I state Get row Item - row and then the Write Line row.ToString it displays all of the rows.
Could you please help me to identify just one row based on the row number in my datatable?
I then need to find this specific row from the datatable in a web page and have tried Send Hotkey ctrl+f but that did not work either. Please can you help?


#5

Hi @Nyx_Green,
Can you please attache your xml file to see. At @Vinutha , It has to show the each row values.

Regards
Balamurugan.S


#6

web.xaml (10.5 KB)

here is the file as requested


#7

Hi,
Here I have attached your file with correction.

File : Data Table.zip (2.7 KB)

Regards
Balamurugan.S


#8

Thank you @balupad14, I now have the column numbers. It still gives me all the rows in the output, instead of row 5 value only?


#9

Hi @Nyx_Green,
To get 5 row value , you can use like dtbbproducts.Rows(4).ItemArray

Regards
Balamurugan.S


#10

Hi Bala

Where do I put in that value? New to UiPath Studio so still not so sure as where to put the “dtbbproducts.Rows(4).ItemArray”?


#11

this will return the 5th row value to array string[]

S.No Name
1 xxx
2 yyyy
3 sss
4 bbb
5 sdff
6 dfgg

String.Join(",",dtbbproducts.Rows(4).ItemArray)
it will return as 6,dfgg

Regards.
Arivu


#12

Hi,
Normally Row index starts from zero. At your sample project , It will display the “Fiber”.
Here I have attached the modified one of you : Data Table.zip (2.8 KB)

Regards
Balamrugan.S


#13

Alrighty, so my output still showed the requested line and duplicated it. I then removed the for each row and it worked. My output only displays 1 row which is exactly what I wanted.

Thanks for all the help

web.xaml (10.5 KB)


#14

Hi,
The below one has to change…

image

The right one …
image

In my previous post of sample file will get clear.

Regards
Balamurugan.S


#15

Hi, thanks and adjusted accordingly:

web.xaml (8.5 KB)


#16

Nice :slight_smile:


#17

how to dump excel file into database…Main.xaml (9.6 KB)