Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Dynamically Rename Excel File Output

cdunn
5 - Atom

Hi,

 

I'm looking to schedule a workflow to run weekly, but in order to do this I need to dynamically rename my Excel file output with the date range. Below are some examples of what I'm working off of, and what I would like my final outcome to be. As well as some of the issues I've run into.

 

Desired File Name: This_is_my_file_YYYYMMDD-YYYYMMDD.xlsx

 where YYYYMMDD-YYYYMMDD gets replaced with a string field I already have in my dataset

Desired Sheet Name: Sheet 1

 

I have been trying these options in the output tool:

- Take File/Table Name From Field

- Field Containing File Name or Part of File Name (Keep Field in Ouput unchecked)

 

Option 1: Append Suffix to File/Table Name

Result: Just renames the Sheet

 

Option 2: Change File/Table Name

Result: I changed my YYYYMMDD-YYYYMMDD field to the entire file name and sheet name (This_is_my_file_YYYYMMDD-YYYYMMDD.xlsx|Sheet1) but it still only renamed the sheet

 

I also tried variations on the original file path/file naming to exclude the file name, to have part of the file name, to exclude the sheet. And none of these combinations seemed to work.

 

Can anyone advise of the best way to tackle this?


Thanks for the help!

Carmin

4 REPLIES 4
michael_treadwell
ACE Emeritus
ACE Emeritus

This may not solve your exact issue, but it should get you started.

 

You are looking to use 'Change Entire File Path' in combination with the Formula tool.

cdunn
5 - Atom

Perfect, thanks for your help!

 

Puneet
5 - Atom

Please let me know how to do same thing for In Db output.!!!!!! Strucked!

jsuptic
7 - Meteor

I like your solution, but have a suggestion. Instead of coding the date in the excel file use DateTimeToday() in the formula. This will dynamically create the date and time stamp.

 

Jason R.S.

Labels
Top Solution Authors