Hello, i need support for a excel files and move files activity

i have created a automation for some excel files. some of them contain a word “Error” and some are not. what i need is to iterate through all files in folders and check a specific cell if it contains the word “Error” move it to another folder if not keep the file as it is. the problem is the robot can’t move the files with the Error word i don’t know why. here is a print screen and the .xaml file if anyone can adjust it to work correctly it will be great. thanks


01-GL Request Template Oct-2023- Royalty.xlsx (126.1 KB)
Main.xaml (13.7 KB)

Check the file is present or not in the location, Check in the immediate panel what value are you getting.

Please use the move file after excel activity(" Excel application") I guess it is used in excel.

Hi @mohamed.saty2012 ,

Could you check the properties of the Move File activity ? I believe the Source file is not properly configured as we could see only the Folder mentioned in the error.

Let us know what are the values you have passed to it.

The From property of Move File need to contain the full path AND FILENAME of the file, not just the folder path.

Also, you should to the Move File after the Use Excel File activity not within it, because the Use Excel File will keep it locked and therefore unable to be moved.

the Path is configured correctly Bro.

if i inserted the name of the file after the path the robot move the file that i have inserted in the form and ignore the condition that i need. which is when the robot finds the word Error in the file move it otherwise leave it as it is.

image

No it isn’t bro. It needs to be the full path and filename. If you don’t give it the filename how will it know which file to move? It isn’t linked to the Use Excel File scope, it’s a completely standalone activity.

if i inserted the name of the file after the path the robot move the file that i have inserted in the form and ignore the condition that i need.

No it won’t. The condition is in the If. It only gets to the Move if the condition in the If is met.

Hi @mohamed.saty2012

Are you using For Each File in Folder ?

Could you share screenshot for this activity configuration ?

Hi @mohamed.saty2012

Please modify the From in Move File activity to CurrentFile.Tostring

1 Like

Thank you very much this wok but i had to add another activity to fix another error.
i added kill process for excel before moving the file to close the excel sheet before moving it. otherwise, it will not move and give me error that the file is being used. thanks again.

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