Get data from last cell in column

datatable
activities

#1

How can I tell A+B Assign to only get the data in the last cell of the column?
Now it extracts all the rows.

warranty.xaml (8.8 KB)

Thanks!


#2

@Niels_Frederickx, You can access the last column as follow when you are in for each,

row(dt.Columns.Count-1) .ToString

will be your last column of that row. Note: dt - Your datatable Variable

Regards,
Dom :slight_smile:


#3

Unfortunately I’m getting an error

warrantyError.xaml (8.8 KB)


#4

@Niels_Frederickx,The problem is in Extract Structured Data that you have used. Please make sure that you point the table you wanna extract in web properly.

Regards,
Dom :slight_smile:


#5

It was the chrome extension. I needed to reinstall it before it was recognized again by UiPath.

Unfortunately it still is outputting 2 results instead of the last one.
warranty2.xaml (8.8 KB)


#6

@Niels_Frederickx,

This might be because the extracted column might have a merged data.
Can you share the screenshot of the datatable you are extracting ?

Regards,
Dom :slight_smile:


#7

Is this what you need?

Actual page: http://www.dell.com/support/home/be/nl/bebsdt1/product-support/servicetag/fw57p02/warranty

The data I need will always be the lowest and most right of the table.

Thanks for helping me!


#8

@Niels_Frederickx,

Use dt(dt.Rows.Count-1)(dt.Columns.Count-1).TOString in assign activity and assign to string variable.

dt - your datatable variable

Regards,
Dom :slight_smile:


#9

yourTable.Rows(yourTable.Rows.Count-1)(yourTable.column.count-1).ToString()


#10

Sorry, Still nu luck.
UiPath is now asking for a column.


#11

yourTable.Rows(yourTable.Rows.Count-1)(yourTable.Columns.count-1).ToString()


#12

@Niels_Frederickx,

dt(dt.Rows.Count-1)(dt.Columns.Count-1).TOString.

Missed “S” in column

Regards,
Dom :slight_smile:


#13

Thanks for helping me out.
It works perfectly now!

:slight_smile: