Alteryx Designer Desktop Discussions

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

How to OutputToDifferentTabsWithTimeStampsInFilename

Astyx
5 - Atom

Hi,

I'm trying to build a workflow that will produce an Excel spreadsheet with 3 tabs such as "Germany", "France", and "Italy". I'd like to have the output save as "CarsByCountry mm-dd-yyyy hh:mm" so the output will have a date and time stamp attached to it. So far I was able to build the Excel sheet with those 3 tabs and the time stamps but I don't know how to include the time stamps in the saved file name.  Any help will be really appreciated.

4 REPLIES 4
ivoller
12 - Quasar

Add a formula to set a field Fullpath to something like "folder\"+[Filename]+".xlsx|||"+[TabName] then in the output tool use Take file/table Name From Field | Change entire File path | Field containing File Name = Fullpath

Astyx
5 - Atom

Thank you for helping out!

I'm not 100% sure that I followed correctly your guidance, however, I'm getting the following error: "Error: Output Data (12): Unable to Open archive for zipping: C:\temp\CarsByCountry.xlsx|C__temp_CarsByCountry 07-17-2018 17_16.xlsx Error Opening file: C:\temp\CarsByCountry.xlsx|C__temp_CarsByCountry 07-17-2018 17_16.xlsx
: The filename, directory name, or volume label syntax is incorrect."

See attachment.

ivoller
12 - Quasar

Hi,

 

The error you were getting was because you needed to use Change Entire Path option for the Output Tool. However, with the way you have the workflow configured right now, you will still have issues with failing to write to excel because it's still open by the previous write action. Note. The Block Until Done only stops further processing until all the records have passed through which means the first Output Tool may not have closed Excel before the next wants to write.

 

Another way to achieve this is to Union your data streams and then do the write to Excel in one Output Tool by using the Change File/Table Name option.

 

See attached.

Astyx
5 - Atom

Hi,

I like the modification you made. You removed the block until done and used TabName instead of Fullpath. The Excel file shows the 3 tabs "Germany, France, Italy". However, the file is saved without adding the time stamps. I will keep working on it and maybe build something completely different. 

Thank you VERY much for constantly answering my questions.

Labels