Hello,
Because header col dynamic so i can’t delete by name col
Can I delete column by condition: have value: x, Φ, OD…
Nitya1
(Nitya Tomar)
2
Yes, you can delete a column by condition using UiPath. Here’s an example of how to do it:
- Use the “Read Range” activity to read the data from your Excel or CSV file into a DataTable variable.
- Use a “For Each” activity to loop through each column in the DataTable.
- Inside the “For Each” loop, use an “If” activity to check if the column contains the value you want to delete.
- If the column does contain the value, use the “Remove Data Column” activity to delete the column from the DataTable.
- Once you have looped through all the columns, use the “Write Range” activity to write the updated DataTable back to your Excel or CSV file.
Jithesh_R
(Jithesh Karkera)
5
Hey @anh.nguyen ,
Check this workflow
DeleteColumnByCondition.zip (2.3 KB)
Regards,
6 Likes
system
(system)
Closed
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.