How to move an excel file to another folder if a particular column has same value

Hello all,

I have an excel file I want to move that file to another folder if “Verified” column has same value called Done

2 Likes

Hi @Harshita_Ramesh ,

Maybe a Revision of the Statement is required, Do you want to move the Excel file or the files present in the Invoice Link column ?

Or Do you only want to copy the rows which has the value as Done in Verified Column to a Separate Excel sheet ?

Let us know the exact requirement as there are some things from the statement that is not clear.

@supermanPunch

I want to move the Excel file and files present in the Invoice Link column both when verified column has only Done value in it

Hi @Harshita_Ramesh ,

It looks like the Initial Step would be the Filter Stage, You could use Filter Datatable Activity to keep only rows which has value Equal to "Done" in Column Verified.

Next, we could Perform an Iteration using For Each Row in Datatable Activity and move the files mentioned in the Invoice Link Column.

There is still a confusion as to which is the Excel file that is to be moved as we do see any .xlsx extensions in the Invoice Link column.

Maybe you could check these steps at first and let us know if you were able to move the files.

@supermanPunch

More than moving the files in the Invoice link I want to move the excel file if all the row values of Verified column is done

@Harshita_Ramesh ,

As already highlighted, it is not clear what is the Excel file that is to be moved. Also, we see that a Move is to be done only if All values of the Verified Column is Equal to “Done”.

Is it the same Excel file where we are comparing the data ?

Ignore the Invoice link column. I want to move my current excel file if all the row values of column verified is Done

@Harshita_Ramesh ,

In that case, You could use the below Linq Query to Check if all rows of Verified Column has the value “Done”.

DT.AsEnumerable.All(Function(x)x("Verified").ToString.ToLower.Equals("done"))

Here, DT is the Datatable that contains the data present in the Excel file. It is the Output of using Read Range Activity.

The above Expression will result in a Boolean True if all the values in Verified Column is Done.

You could directly use the above Expression in an If Activity. In then block you could perform the moving of file using Move File Activity.

1 Like

@supermanPunch
This worked thanks

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.