Obter a ultima linha de uma dataTable

Olá comunidade!

Preciso obter o ultimo registro de uma coluna, e que esse valor não seja nulo, ou seja, que desconsidere as linhas em branco.

Hi @devrpa746 ,

Assuming you are reading the Excel data as a Datatable using Read Range activity, we can use the Below Expression to get the desired output :

DT.AsEnumerable.Where(Function(x)Not String.IsNullOrWhiteSpace(x("YourColumnName").ToString)).Last.Item("YourColumnName").ToString

Here, DT is the Datatable variable output from Read Range activity.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.