what I'm trying to achieve is I have two excel files ( Two months Data) with two tabs with different schema and I want to combine all these into one single Dataset which can be done by creating the Nested macro mentioned in the post below by Andrew.
The solution By Andrewl combines the Data set when we run the workflow based on different schema with multiple tabs and Multiple sheets.
What I'm looking for is still I want to combine two files with different schema and I should be able to filter for specific worksheet in my main workflow and then do combine the data set on my main workflow say.
I'll leave this open for the community geeks to see if any one can provide a solution.
Solved! Go to Solution.
Hi @suby ,
I have two macros that do this for you. The first reads in the sheet names and appends to the filename. The second reads each file in dynamically and creates a single file of all inputs.
I've attached the macros and and example workflow.
I hope this helps,
M.
Hey @suby , no problem.
I've attached the workflow. You'll need to save the macros I sent previously to your macro folder, and then you'll need to point the first tool to your folder location where the files are stored.
M.
Hi,
I pointed the Directory tool where the files are stored but still getting this error.? can help
Hello,
I saved the workflow in folder called Download3 and created a sub directory within that folder called Macro and copied two macros still I'm getting the same error.
Hi @suby ,
no you need to save the macros in your macro folder.
Go to Options->User Settings->Edit User Settings:
Then click on the "Macros" tab:
This shows where your macros are saved. If you don't have one, create a folder somewhere convenient and click the + sign here. Navigate to that folder. This is now your designated macros folder.
The macros I sent previously, the .yxmc files, need to be saved in this folder.
Once you've done this, close and re-open Alteryx, then try the workflow I sent.
M.
Hello,
Apologize i did followed the same steps as you mentioned and i saved the Macros in my My Macros Folder and the workflow is saved under the Downlead 3 folder and still I'm facing the issues.
Hi @suby ,
I'm not sure what the problem is, but if you've saved the macros in the correct folder you should see them in the In/Out section:
If so, you can simply replace the first error file with the "Dynamic Multi File Sheet Names" macro, and the second with "Input Multiple Scheme Flat Files" macro. Connect them up as previously shown (set the parameter to be Fullpath) and you're good to go.
M.