This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Having an issue outputting data to excel sheets. I'm reading an existing template (has calculations and formatting) into the working directory where I then output data to that template.
Sometimes, the output data tool will end up having no data to that sheet as a result of filtering. In these cases, it seems like Alteryx waits until the end of the flow to output the 0KB sheets regardless of where they fall in the flow and any blocking/waiting that I do.
This is an issue because the empty output acts as a "format" and leaves only headers in the sheet, and at the end of the flow I am using run command to move files around dependent on whether the user/creator wants the file to download from gallery or sent in an e-mail. If the empty output waits until the end, the run command moves the file and/or an e-mail is sent while the sheet isn't formatted, then a small file is created in the place I just moved one from when it does finally run.
I can't really use an event either, as I'm writing the part that moves files as a macro (that includes an e-mail batch macro that allows different numbers of attachments) to be used in multiple flows.
I'd really like a way to force all the files, even if only containing headers, to complete writing before my end process without having to add a tool to every output if someone knows a way to do that.
Thanks for spending time with this - in my case I actually did want the 0KB files to write prior to the command tools running, and I was trying to keep things from being complex by using batch macros, or wrapping outputs in macros.
I ended trying to think simply and coming up with the attached macro solution that just adds in a blank row to the end of the any data frame, and in the case of no data output just adds a blank row. If the end user is trying to use my other solution, they just need to add in these macros prior to outputs. This avoids the 0KB issue.
I'm sure it would be easy to add in some logic that bypasses the row add if there's data in the incoming stream, but for my purposes it doesn't really matter.