Free Trial

Alteryx Designer Desktop Discussions

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

Append File Name ONLY (not table name) in Excel Output?

cbridges
11 - Bolide

I have a workflow where I'm outputting to 4 separate worksheets in the same Excel workbook, and I want to append the file with the current date when I run it.

 

Problem is, the output tool to do that doesn't seem to give me the ability to specify that I want to append the name of the file, not the name of the table (worksheet).

 

Is there a way to tell Alteryx to append the file name instead of the table name?

 

Change File / Table Name didn't work, and neither did Change Entire File Path as there is no longer a way to specify the sheet name if I'm trying to specify the name of the file.

 

 

@thizviz
20 REPLIES 20
JohnJPS
15 - Aurora

In the same list, did "Append Suffix to File/Table Name" also fail?  I would generate a string version of the current data, and use that to append as a suffix to the root file name given with the "File Browse.." dialog.  [EDIT: ah, but I see that only changed the sheet name.]

michael_treadwell
ACE Emeritus
ACE Emeritus

I'm a bit confused.

 

Are you looking to write to 4 separate worksheets and have a column in each worksheet that contains the name of the XL file with current date to which you are outputting?

 

Or are you looking to, each time you run this, create 4 new sheets which have a table name plus a date?

JohnJPS
15 - Aurora

Or, better: can you use the Formula tool to specify the full file name, including the sheet:

 

"FullPath\fileNameStub" +
DateTimeFormat(DateTimeToday(),"%Y%m%d") +
".xlsx|mySheet"

 

... and then use the "Change Entire File Path option?

 

michael_treadwell
ACE Emeritus
ACE Emeritus

@JohnJPS in that example I believe you would have to generate both the file path and the table name since she is outputting to four separate worksheets.

JohnJPS
15 - Aurora

@michael_treadwell, I have ".xslx|mysheet" in there for the file extension and worksheet.  But that certainly is just for one sheet.

 

cbridges
11 - Bolide

Unfortunately, it still give me an error that I must specify a sheet name, even though the sheet name is included in the formula. Weird, I know.

@thizviz
cbridges
11 - Bolide

Neither... I originally set up the workflow to output 4 worksheets in the same workbook, all named according to what follows the pipe in the file name. I don't need any reference to today's date within the workbook. What I want to do is append the name of the workbook with today's date. The problem I'm running into is that in Alteryx file/table are the same thing....if you're outputting to multiple sheets, the sheet names get the appendation, not the file name.

@thizviz
michael_treadwell
ACE Emeritus
ACE Emeritus

You could try to place the Output tool inside of a batch macro where the control parameter updates the 'Write to File or Database' field with a new date.

cbridges
11 - Bolide

Precisely - now you feel my pain :-)

@thizviz
Labels
Top Solution Authors