Alteryx Designer Desktop Discussions

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

Excel Formatting Retention for a Dynamically Named Output File

Chris_Leimenstoll
6 - Meteoroid

Hello all, I think I have a stumper for Alteryx today but thought I'd put it out there for everyone's thoughts...

 

I recently learned from a question on here about how to use the Preserve Formatting on Overwrite option for an Excel Output object... this of course works great if I am writing to the same file every day.

 

I also learned from the topics here about how I can dynamically name a file, by simply using a formula item to set a file name with a dynamic date as a new field that then replaces the file name on the Excel output. This also works great and gets me one step closer to full automation on dated files being created for archival purposes.

 

The dilemma now is... the fact I am writing to a new a file everyday, means I have no formatting to preserve. And so I need to go into the file anyway and fix the column widths/number formats that go to the customer I send this report to.

 

I am not sure if there is any method to have a "template" excel that Alteryx can write to before doing the dynamically named file creation. Does anyone have experience with this or have an outside the box solution they have found? I am ready to move forward by simply writing to two excel outputs, the only annoyance is this will get a little ugly and unwieldy in my plan that already outputs to 6 different sheets on a single excel file.

 

Thanks so much everyone for your help!

4 REPLIES 4
Luke_C
17 - Castor

Hi @Chris_Leimenstoll 

 

This is totally possible with run command tools. You can maintain a blank 'template' file with the formatting you want, and then have the workflow copy that template, output to it, and rename it. Check out my response on the below thread that has an example of how to do this. 

 

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Clearing-Data-in-Template-before-Overw...

 

 

Chris_Leimenstoll
6 - Meteoroid

This is very interesting to me! However I can't seem to open your attachment... is this for 2021? It tries to "import" the package which I don't recall it asking me to do for previous packages, and then eventually simply does not open the package after mentioning it was made in a newer version than I have (2020.2.3.27789). I wonder if it is related to this package "creating folders" as you explain in your text. Any thoughts?

Luke_C
17 - Castor

@Chris_Leimenstoll 

 

After you open the yxzp file it should create a subfolder with the same name in your downloads folder. After that, open the yxmd file that is in the subfolder in notepad and change the version to 2020.2, save, and open in alteryx

 

Luke_C_0-1616691436332.png

 

 

Chris_Leimenstoll
6 - Meteoroid

Thank you! This is a bit advanced for me so I'll need to play around with it to make it practically work for my plan that has multiple outputs and tool containers, but this will prove very useful to me!

 

Thank you very much!

Labels