community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

xls File Output Naming

Asteroid

Hello!

 

Is there a way to automatically rename .xls ouput files to include the date for each time you re-run a workflow?  I am deleting and appending a predetermined range of cells and would like the file to automatically rename itself with a new date for version control.

 

Thanks!

Alteryx Partner

Dear @navypoint16,

 

The easiest way is to add the date of today (using a formula tool and the DateTimeNow() formula).

In the output you can easily append this date to the filename.

 

Sol.PNG

 

Best,
Yalmar

Asteroid

Thank you, Yalmar - this is helpful.

 

However, this seems to be appending the output tab, not the output file name.  Is there a way to designate the date to the file name rather than the tab? 

 

Additionally, it created three separate tabs, representing the three seconds across the run time.  How can I remove seconds from the datetimenow() function so it only shows me the month and day?

 

Thanks!

Alteryx Partner

Hi @navypoint16,

 

You also have some other options in the dropdown, for example 'Change File/Table Name'.

Moreover the problem with the minutes and seconds can be solved using 'Left(DateTimeNow(),10)'

 

Best,

Yalmar

Asteroid

That option is still only changing the name of the tab, rather than the file.

 

I tried the option "Change Entire File Path" and received the error "You must specify a sheet name".

 

 

Alteryx Partner

Hi @navypoint16

 

Changing it to Change Entire File Path using the variable 'Path' with the following content

'XYZ_'+Left(DateTimeNow(),10)+ '|||Sheet1'

 

Where XYZ is your filepath, including the name of your file.

For example:

'C:\Users\yalmar\Desktop\Sol_'+Left(DateTimeNow(),10)+'|||Sheet1'

Labels