Excel Files Automation

Hello everyone,
I am new to UI Path and this community.
I am trying to make a automation that does the following:

  1. Checks a specific folder for any excel files.
  2. If an excel file exists,copies cells B4:F39
  3. Creates a new excel file in a specific folder and pastes them there.The new files name would be the source files name plus the word Final
  4. Removes the source excel file and pastes it in a third folder

So far I’ve done the following but it’s not working.I would appreciate any help.
Tnank you in advance

Test.zip (5.9 KB)

Use the attached flow.


Use for each file in folder activity with filter on *.xlsx

Then inside the loop use currentfile.fullname or currentfile.name to get the complete file location

Pass these in excel scope to read excel and then use write range which automatically created the new file if not present


1 Like

Thank you ! Can u guide me to make this work?For example where to set the folder paths?

You have to give the folder path in

Thank you for the reply.I didn’t elaborate,my fault.I meant the other two folder.The one where the processed go and the other the source will go

As of now both the source and the output are getting stored in the same location

you can make the changes in the shared flow as per your requirements.

Thank you again.
I am getting Assign: Value cannot be null. (Parameter ‘path1’) error.Any chance you know why?

you might be passing null values inside the invoke workflows.

Test.zip (6.1 KB)

Try using the updated flow I have created the in argument for output directory in “WriteFiles.xaml”

Thank you so much.I am still getting error but has something to do with my path I guess.Not sure

can you please share your xaml how you are passing the path, I will make the correction and reshare it with you.

Sure here is the whole project.I didn’t change much.Sorry if that stuff are obvious,I am new to this
Test.zip (170.1 KB)


Please close the excel if it is already open…

Or check if the file is locked


1 Like

I checked those at the start.
Thank you for replying!


In the file nothing looks wrong…

Please check from
Task manager if any background excel is open and kill it


Unfortunately that is not the issue as Excel is not open.
Thank you for replying!

1 Like


is your folder synced with onedrive or any other cloud? if so pls try to store your excels on local drives.


No it’s only stored locally.
Thanks for your reply


Please copy the location you got in error and check if manually you are able to use the location and open thr file…

If yes then rename the file which is already there an run it and check


1 Like