I have multiple files with 2 sheets (say A and B). The goal is to create a single output file with 2 sheets containing filtered data from A and B of each file.
I was able to create a workflow with 2 macros (1 each for A and B) which read and filter data from directory. However, I am not able to create a single output file combining their outputs. To make matters worse, when I try to write an output .xls file for a single macro (say for A), I see it has results in multiple sheets - 1 sheet for each file the macro read. I want the output file to have single sheet for all A and single sheet for all B. Any help with this would be great!
Source I used for creating my macro to read input from different files having same sheet name: https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/CS-Macro-Dev-Reading-in-Multiple-Fi...
Thank you.
Solved! Go to Solution.
Thanks @ashissanpui . Keep as output is selected; it works fine when I use only input tool combined with others. However, when I use my macro (which was a very noob level one), I see the source field at macro input but not at output so I suppose the macro needs to be relooked at.
Another thing caught my eye though. So Sheet A and Sheet B have different columns (say 4 and 7, with 2 common columns). Union tool essentially stacks them on top of each other, resulting in 9 cols. So when I split my output data into sheets, they have 9 cols instead of 4 and 7.
Any ideas around how I can work around that, please?
I think first you need to consider the objective of doing that automation. I think you are trying to mimic your excel work through Alteryx. To achieve that, you have to split the data in two streams and use select tool to get the desired columns in each file. You may use block until done if you are writing in same file which blocks one process until it gets completed.