How to delete the entire column in excel if the value is zero. The column will be dynamic always and it will be multiple columns.Please suggest. Im using UIpath community version. Attached the excel for exampleFilterColumnwithZeroinExcel.xlsx (8.3 KB)
@asatheeshk21
First using Read range activity read excel file and store in datatable.
After that use FOR EACH ROW in that datatable and then in it for each activty for columns in that datatable.
Then in nested for each use if condition columnValue.Tostring = β0β True Then use delete column activity and pass that dataColumn in it.
it will work for all dynamic rows and columns in datatable
After in end use write range to write data in excel.
Im new to RPA Uipath,
You have mentioned below comment.
βThen in nested for each use if condition columnValue.Tostring = β0β True Then use delete column activity and pass that dataColumn in it.β
Can you pls tell me what needs to be given in delete column table name and column name.
Thanks for the response, My requirement is to delete the entire column whichever is having the value of zero.The output should like sheet 2 attached herewithtest Report (1).xlsx (10.8 KB)
If there is any one non zero then only whole column value should be there if not then whole column will be deleted.
@asatheeshk21
As I can understand the requirement here.
Requirement-
If any column value is zero then that column should be deleted and the one who is having value should be remained.
sheet 2 - output required.
sheet 1 - test Data.
Still i didnt get the expected result in the xaml file which you shared. PFA the xaml which im using which you shared previously. Kindly suggestFindValueInExcel (1).xaml (10.4 KB)
Sorry I think you didnt used my latest sheet after i edited.Please refer sheet2. Now june month is missing in the latest. Kindly suggesttest Report (1).xlsx (10.8 KB)