I'm trying to run/read all the excel files inside the folder using Batch Macro.
In my folder I have 4 files. When I run the batch macro only 2 files are read.
But when I removed the 2 files that are working and left the 2 files not working when I run again the workflow and it will read the 2 left files.
The first 2 files have a 190+ rows.
And the second 2 files have 490+ rows.
I don't know if this is the cause why batch macro is not reading all the files.
If this the cause is there any way to fix this? Thank you!
Hi @RichardAlt,
The easiest way to merge all the files will be using this macro:
https://gallery.alteryx.com/#!app/Read_All_Excel_Files/58dd51b3a18e9e18fca64172
I know I didn't answer your question but I have one suggestion maybe you are reading 2 files in one format and 2 in a different format and your macro can read only one format of the data at once?
Could you share you're macro with a sample data it will help us to investigate.
as @Emil_Kos said may be the file format is not the same, or schema is different between files, Have you select this option in the macro:
Attached a workflow with a macro that will work for you as well,
Hope this helps!
Regards
Hey @RichardAlt
The best way to debug this is to:
- Do a debug output of the data-stream just before it goes into the batch macro (i.e. just output to a file like "debug1.yxdb") - this will tell you if the batch macro is even receiving the 4 files or only 2
- Within your batch macro - do a debug output that saves the control parameter - again, that will help to debug this
- Turn on macro messages in your macro in-case there's a warning or a macro message that is being suppressed.