Excel - copy .xlsm file

Hi all,

I am having issues with copying a .xlsm file to another location and giving it a dynamic name. I have a master data excel file which contains data. Then I also have a .xlsm template that is fed with data from the master excel. I want to create a new excel file (with use of the template) per row in my master data excel.

The master data excel also has 2 specific columns for which I am getting data to store in the title of the file.

Current set-up:

var1 = get row item of column A
var2= get row item of column B

I copy my template file (XLSM) from: path A (hardcoded) to destination: path B (hardcoded)+var1+var2+".xlsm"
Afterwards, I do open excel application and open the path in destination.

Current set-up says that the file already exists when creating the second one.

Anyone has an idea?

Do you check before creating the file if it exists? PathExists Activity?

Are they in the same folder or different?

1 Like

Hi @TimK,

Thanks for your reply. I found the solution.
The path existed but the PathExists Activity made me think in the right direction and eventually I found the solution.Was a combination of several things :).


1 Like

Glad you managed to solve it :slight_smile:

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