Get data from last cell in column

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!

@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:

2 Likes

Unfortunately Iā€™m getting an error

warrantyError.xaml (8.8 KB)

@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:

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)

@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:

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!

@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:

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

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

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

1 Like

@Niels_Frederickx,

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

Missed ā€œSā€ in column

Regards,
Dom :slight_smile:

Thanks for helping me out.
It works perfectly now!

:slight_smile:

1 Like