Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
We’re experiencing technical issues with our vendor that are affecting license activations for Designer Desktop. We don’t yet have an estimated resolution time. We apologize for the inconvenience and will share updates as we have them.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Run command to copy a file multiple times

Yiannis_xn
5 - Atom

Hello,

 

I have a bank account, with multiple users, each one with their own unique card. I then want to alteryx to take the statement and collate all the transactions made by each individual person and break it into separate excel files using a specific template that i already have. I have managed to already identify all the cardholders, i have created a unique output path for each one in the desired output folder and now i want to break it automatically into smaller excel files, one for each cardholder.

 

From what i have read, the run command will help me do that, to copy the template i already have x amount of times, name it the name of each cardholder and then save their transactions from the bank statement into their individual excel files.

 

I have got to the point that the run command saved all cardholder in a different tab within the template, but also doesnt keep the format. 

 

Can anyone help?

8 REPLIES 8
jrlindem
11 - Bolide

Is the problem you're solving the formatting issue?  I've found that to be a challenge as well.

 

In the template, assuming excel...

  • I often pre-format the columns
  • I've also used the Reporting tools (i.e. Table Tool) to render out an actual table that then can be placed on the excel tab by specifying the range of cells it will occupy.  Using your data you can dynamically measure the number of rows of data and then feed that into the formula that calls out the table length.

 

Meaning, if your table needs to occupy A1:Z#

 

Then if you data has 90,000 rows, your formula would build the range as A1:Z90000 based on that row count.  (where Z corresponds to the number of columns and # is the number of rows (including header)

Let me know if that's the right track of what you're trying to solve for and I can give additional input if that doesn't get you were you need to be.

Yiannis_xn
5 - Atom

Hello, formatting is also part of the issue, but i need the workflow to send the information to separate excel files using the excel template i have created. Right now it doesn't create a copy of the template and then save the information to each separate file, but rather creates a new tab within the original template, and also gets rid of all formatting

jrlindem
11 - Bolide

Okay, gotcha.

 

So, within your data, i'm sure you've figured out to designate a destination file.xlsx|||sheetname

When you create the batch command, just configure multiple rows of instruction to create multiple copies of the template using move/copy commands but each time it should copy the template with a new name:

  • template_copy_a
  • template_copy_b
  • template_copy_c
  • etc.

This is based on the partitions in your data. If you need 5 seperate files due to a field that splits the data by A, B, C, D, E; then have your template use that same partitioning information to create that many copies of the template.

 

Then, when you write the data, you can specify the data should go into each of the respective copied templates by name instead of by tab. You can do all of this using formulas.

jrlindem
11 - Bolide

Give this a try (attached).  I believe this illustrates how you can copy a template multiple times in one shot, then write partitioned data to the respective template copy.  Hope this helps!  If so, please mark as solution!

 

Keep in mind you'll need to update two filepaths in the formula tool.  I've noted it with red text.

apathetichell
20 - Arcturus

The easiest way to do this:

 

template file:

blob input (of template file)

block until done tool

join with your data source of new file names.

blob output tool.

 

 

other branch of block until done tool ---> update new file.

 

there are many. many. many posts about this on this forum. and some good examples of how to do this. It takes a bit of work --- but it's the best/easiest way to do what you are trying to do.

jrlindem
11 - Bolide

I agree @apathetichell .  I find many people have a level of unfamiliarity with the BLOB tool and since the author noted a curiosity around the run-command tool, I figured I'd offer up a solution that illustrates how to accomplish his goal within those tools 🙂

caltang
17 - Castor
17 - Castor

If you can give some sample data, I think we can all help you out. I know it's confidenial, so just build some dummy data and some dummy templates (expectations). Agree with the general approach of @apathetichell - saves you the trouble and @jrlindem 's approach gets you what you want too.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
jrlindem
11 - Bolide

@Yiannis_xn did the responses and solution provide you resolution?  If so, please flag the solution.  Otherwise, please feel free to continue engaging if you need further assistance.

Labels
Top Solution Authors