DimiG
(Dimitris G)
1
Hello everyone,
I am new to UI Path and this community.
I am trying to make a automation that does the following:
- Checks a specific folder for any excel files.
- If an excel file exists,copies cells B4:F39
- 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
- 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
Anil_G
(Anil Gorthi)
3
@DimiG
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
Cheers
DimiG
(Dimitris G)
4
Thank you ! Can u guide me to make this work?For example where to set the folder paths?
Sanjit_Pal
(Sanjit Pal)
5
You have to give the folder path in

DimiG
(Dimitris G)
6
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
Sanjit_Pal
(Sanjit Pal)
7
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.
DimiG
(Dimitris G)
8
Thank you again.
I am getting Assign: Value cannot be null. (Parameter ‘path1’) error.Any chance you know why?

Sanjit_Pal
(Sanjit Pal)
9
you might be passing null values inside the invoke workflows.
Sanjit_Pal
(Sanjit Pal)
10
Test.zip (6.1 KB)
Try using the updated flow I have created the in argument for output directory in “WriteFiles.xaml”
DimiG
(Dimitris G)
11
Thank you so much.I am still getting error but has something to do with my path I guess.Not sure
Sanjit_Pal
(Sanjit Pal)
12
can you please share your xaml how you are passing the path, I will make the correction and reshare it with you.
DimiG
(Dimitris G)
13
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)
Anil_G
(Anil Gorthi)
14
@DimiG
Please close the excel if it is already open…
Or check if the file is locked
cheers
DimiG
(Dimitris G)
15
I checked those at the start.
Thank you for replying!
Anil_G
(Anil Gorthi)
16
@DimiG
In the file nothing looks wrong…
Please check from
Task manager if any background excel is open and kill it
Cheers
DimiG
(Dimitris G)
17
Unfortunately that is not the issue as Excel is not open.
Thank you for replying!
Hi,
is your folder synced with onedrive or any other cloud? if so pls try to store your excels on local drives.
Thanks
DimiG
(Dimitris G)
19
No it’s only stored locally.
Thanks for your reply
Anil_G
(Anil Gorthi)
20
@DimiG
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
Cheers