Alteryx Designer Desktop Discussions

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

Output Tool

garretwalters12
8 - Asteroid

Is there a way to change the name of an output file? For example my current output is called WorkingPaper.xlsx. However I would like to add the current month and year in front of this. 

2 REPLIES 2
AndrewBanh
9 - Comet

Hi garretwalters12,

 

In order to achieve this, you will be required to use a formula to build your FileName.

 

You will want to start with something along the lines of:

 

"C:\Users\(Your Username)\Desktop\"

 

Then you would want to specify the filename of your .xslx file. This is where you input these date formulas to pull in the month and year. I use padleft() for the month section just in case you want 0's to be in front of months which are single digit.

 

Month: padleft(tostring(DateTimeMonth(DateTimeNow())), 2, '0')

Year: tostring(DateTimeYear(DateTimeNow()))

 

Then you want to add in your "WorkingPaper" part followed by the file type and sheet name.

 

The whole formula should look like this:

"C:\Users\(YOUR USERNAME)\Desktop\"
+ padleft(tostring(DateTimeMonth(DateTimeNow())), 2, '0')
+ tostring(DateTimeYear(DateTimeNow()))
+ "WorkingPaper"
+ ".xlsx|||"
+ "Sheet1"

 

In the output tool, tick the box "Take File/ Table Name from Field".

 

Select the Filename field you created and untick the "Keep Field in Output" checkbox.

 

Let me know if this works for you.

 

Andrew

mceleavey
17 - Castor
17 - Castor

Hi @garretwalters12 ,

 

I've attached a workflow showing you how to do this.

 

You create the Month-Year as below:

 

Formula.PNG

 

Then configure your output tool to append this to the filename:

 

output.PNG

 

Hope this helps.

 

M.



Bulien

Labels