List the Excel Worksheet Names with a Batch Macro
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have a very simple Batch Macro, attached. This is intended to take a Control Parameter (a full file path) and get the Excel Sheet names.
The idea is that I can push a lot of Excel full file paths to the macro, and it will list out the Sheet names.
For some reason the macro stops after the first iteration, and I don't understand why.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Wondering why you would need this as there is already a tool that does this 😉 ..... Dynamic Input Tool
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @joshuaburkhow , this is just the start point for a something that will try to find some particular sheets and try to pull each one in. They are potentially all sorts of formats. Think Dynamic Input with variant schemas. But, having fallen at the first hurdle, I have to wind my neck in a bit!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @JosephSerpis , that is helpful, but not what I am looking for. I am not so much looking for the solution, as for understanding as to why my batch macro runs just one iteration. From my understanding, the macro should step through each input, get the sheet names, and output all the sheet names for the files, but it runs one iteration and stops. Thanks for the reply though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Hiblet I ran your macro it's working as expected in the below screenshot I fed in two excel files each having 3 sheets hence why I have six records.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @JosephSerpis , that is weird, I get the macro stopping after one iteration on my machine. The two attached JPEGs show the yxdb that I push into the macro (list of 3 files) and the other shot shows the feedback from the run. I have attached the XLS sheets, they are just simple place holder fakes, not actual sheets with useful data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @JosephSerpis , Gosh that is weird. I re-started my Alteryx and I still get the same behaviour. I am on 2020.2 . What could be environment specific like that??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Hiblet what is the output from the YXDB from your screenshoot because if it was the same file but repeated in three rows that would explain why it's iterating only once.
