how to filter in excel the value zero or “-”,uipath
1.) Read it out as a DataTable
2.) Use the Filter DataTable activity
3.) Check the Option “remove Row”
4.) Give your Condition (Column = “0”) / (Column = “-”)
5.) Put an Output Datatable Variable in the Output field
Hi
Welcome to uipath community
—hope these steps would help you resolve this
—use a excel application scope and pass the file path as input
—inside the scope use READ RANGE ACTIVITY and get the output with a variable of type datatable named dt
—now use a assign activity like this
dt = dt.Select(“[yourcolumnname] <> ‘0’ “].CopyToDatatable()
Where this dt variable will have the records with column without having 0
And to get the records without - in the column the expression would be
dt = dt.AsEnumerable().Select(Function (a) NOT a.Field(of string)(“yourcolumnname”).ToString.Contains(“-“) Or NOT a.Field(of string)(“yourcolumnname”).ToString.Equals(“0”)).CopyToDatatable()
Cheers @maytepb3
@Palaniyappan Why don’t use some other way instead of using datatable…
like Filter Table from Excel…
Regards
Balamurugan.S
Yah of course na we can
In filter datatable we can mention the input datatable as dt and output datatable again as dt
Where in the column field mention the column name between double quotes as a string and in condition mention as =
And in the value field mention as 0
Use a OR condition and mention again the same column name in column field
—and in condition mention as CONTAINS and in the value mention as “-“
And choose REMOVE radio button
So that we won’t get the records having 0 or “-“ in it
Cheers @maytepb3
Gracias a todos por la ayuda, estoy probando vuestra solución…
asombroso
amablemente hágale saber para cualquier consulta o aclaración
@maytepb3