Hello,
when I use the activity it will stop counting when it encounters and empty row.
How can I solve this? I dont want to delete the empty rows as thery will be needed later on
Hello,
when I use the activity it will stop counting when it encounters and empty row.
How can I solve this? I dont want to delete the empty rows as thery will be needed later on
Hi @VLC
To avoid stopping when encountering empty rows, you can use the “IsNullOrEmpty” condition. Add an If activity to check if the row is empty before performing the counting action. This way, the counter will skip empty rows without deleting them.
Eg:
count = (From row In yourDataTable.AsEnumerable()
Where Not String.IsNullOrEmpty(row(“ColumnName”).ToString())
Select row).Count()
Use read range activity there you can get the output as datatable.
Check for the row count, so here you can the get last row and first.
While using read range workbook, dont check add header then you can get 1st row
Hello @VLC,
According to my understanding, I think you want Count of datatable but it should not count empty Rows.
so here the Solution for your query,
Assign an int32 variable with this value - DT.AsEnumerable().Count(Function(x) Not String.IsNullOrEmpty(x("Column Name").ToString()) AndAlso Not String.IsNullOrWhiteSpace(x("Column Name").ToString()))
where you need to replace “DT” = Your Input Datatable & “Column Name” = Your column name
hope you get your output with this, if you do dont forget to mark this as solution.
Cheers!!!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.