Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Output multiple files using the same excel template

Tienemientje
8 - Asteroid

Hi,

 

I often need to create +-30 files for +-30 different countries based on the country in one of the columns.

 

I have already figured out how I can divide my data over different excel files and tabs.

 

However, I like to start from a sort of template where I have some instruction text on top and some formatting. 

Whenever I need to change that template, I copy the new one 30 times and change the country name, so I can overwrite part of the file later with Alteryx data.  This works, but it takes some time and manual effort.

 

Is there an easier way to copy that 1 template 30 times with the correct output name?

 

example:

country Belgium_data.xls

country Germany_data.xls

...

 

Second question: is there a way to have some formatting done by Alteryx, like column width, cell color,...?  On the community I found some answers about table-layout-render to xls.  But I cannot seem to get that working with my different output files.

 

14 REPLIES 14
kavinganesh
5 - Atom

Hi DavidP

I m quiet new to Alteryx.

Main objective:

 

Have a button inside my excel workbook for the button click event need to call a macro which in turn have to call Alteryx workflow  to copy certain template in that Excel workbook and create a new sheet in same workbook and paste the template in it .

Use case: To have a allowance template sheet in employee workbook , use the same to create for every month for particular employee for further analysis.

 

Need help on copying only certain sheet in the workbook and paste the same.

 

Thanks and let me know if you need any further information.

 

ckirgiz
7 - Meteor

 

Hi @DavidP,

 

First of all thank you for the solution. I am getting an error when I try to do the same. Please see below. Do you have an idea about the reason of this error? I would be glad if you can help. Thank you!

 

 Capture.PNG

jvaucher0804
7 - Meteor

David, thanks so much for this. 

 

Did you create the RunCopyTemplate.bat script first in notepad or how is that generated?

xariet
8 - Asteroid

Hi David

I am trying to use your workflow to generate templates, however, I am getting error code 1 in the run command tool. what might be the reason ?

 

DavidP
17 - Castor
17 - Castor

Hi @xariet 

 

This means that the command that the Run Command tool is trying to execute, i.e. the DOS copy command is returning an error.

 

It's usually a syntax error in your Copy command such as a missing \ somewhere or one too many.

 

Have a look at the [cmd] field just after the formula tool - you can usually spot the error and if not, copy the value of the [cmd] field from the results preview and paste in in a CMD window on your desktop to execute, which will show you what the error is.

Labels