Copy & Paste data from a Data excel file to a Master excel File. (No Issue)
Check if the Data excel File is a duplicate (Yet to be done)
Rename & Move duplicate excel file/completed file after to another folder (Issue)
Once, I have completed copying/pasting the data to master file, I am not able to rename the file as the workbook is still open (Error: The process cannot access the file because it is being used by another process).
If I kill the process (excel), an error of “RPC server is shown. I believe this is because I still require the excel files for other data files.”
Previously, I moved the rename activity outside of the Excel Process Scope (containing all activities) which worked if there are no duplicates, but I do not know how to implement the renaming of file when there are duplicated files.
If there are duplicates or no move/rename would still remain outside
if you dont know before hand if it is duplicate or not then use get files with names and check how many files are there and use that to get the count of files and use the number to rename
By flag I mean, take a Boolean variable and do below:
before entering into excel scope , set that variable to false.
now within excel scope, check if data file is a duplicate one, if yes, set that Boolean variable to “true”. Else do nothing.
Now after exciting excel scope, check the value of that Boolean variable. If it is true, means data file is duplicate one and you would go on with rename and moving same into diff folder, else the usual flow(whatever you want to do if it is not duplicate).