Alteryx Designer Desktop Discussions

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

Best Practices - Always Create an XLSX Output

Brian_Stoffel
8 - Asteroid

A common issue that I run a cross every few months is where I have to create a workflow that requires an XLSX output whether or not there is data. 

 

For example, there is an input data source that may or may not have data. Every time the workflow runs, there must be an XLSX output with the same column titles. There may or may not be data in the columns, but the column titles must be the same. 

 

Every time I run across this issue, I use a different combination of Alteryx workflow tools for a solution. So, I know there are countless ways to accomplish this issue. 

 

What is the best practice for this scenario? Does anyone have a go-to solution?

2 REPLIES 2
jfha97
7 - Meteor

My go to solution is to have the test tool check for records and the message tool. If there aren't any records downstream I print out a message. I also have a text input tool with the column names in both headers and first row. I then union both and the XLSX output should print out the message and the empty columns.

 

This is quite a complicated solution, I am sure you have more straightforward solutions, but these are my 2 cents.

acarter881
12 - Quasar

Hello, @Brian_Stoffel. You may need to elaborate and/or show an example. I know the Output Data tool will write to Excel even if there are only column headers in its input. If it's something different, then it may require some other tools such as UnionDynamic Rename, etc. The Count Records tool is a macro. It includes a way to accommodate for no records. Perhaps this is similar to what you need.

Labels