I want to delete row that column Amount = blank.
remark : My real data have 4K rows
Please guide me about it.
I want to delete row that column Amount = blank.
remark : My real data have 4K rows
Please guide me about it.
Hi
Hope the below steps would help you resolve this
Use a read range activity and get the output as dt
Then Use this expression in a assign activity
dt = dt.AsEnumerable().Where(Function(a) NOT String.IsNullorEmpty(a.Field(of String)(“Amount”).ToString.Trim)).CopyToDatatable()
This will remove rows with amount column being blank
Then we can use this with write range and passing dt as input and enabling add headers to write it to a excel file
Cheers @fairymemay
Try below expression.
dtOutput = dtInput.AsEnumerable.Where(Function(row) Not String.IsNullOrEmpty(row("Amount").ToString.Trim)).CopyToDataTable
And then use Write Range activity and pass above output DataTable to write into excel file and delete original input sheet.
Check once whether datatable is having some value
Use a writeline and mention like this
Dt.Rows.Count.ToString
If this shows as 0 check once the source of input
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.