Batch Macro Error - "No sheet specified"
- 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 workflow which reads excel files from a directory and feeds into two batch macros, which export to XML. The macros are similar except that they are for different sheets within each excel file.
I am selecting full path:
Within the macro the settings are as follows:
<List of Sheet Names> is selected for 'Table or Query' and I then filter for the sheet I want (red arrow above). The second batch macro is effectively just the false branch of this filter tool. I need to produce separate outputs and have 2 batch macros.
Can anyone please tell me why I am receiving the following error message when attempting to run the workflow? The macros run without error with the same file that is held within the directory.
Any help is greatly appreciated.
Many thanks
Solved! Go to Solution.
- Labels:
- Batch Macro
- Developer
- Dynamic Processing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @HenpetsGordres1,
You may need to replace the "<List of Sheet Names>" part of the file name with the new sheet name before you read in the data.
Replace([FileNameField], "<List of Sheet Names>", [SheetNameColumn])
If this solves your issue please mark the answer as correct, if not let me know!
Regards,
Jonathan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Jonathan,
Thank you for your reply, apologies I'm not sure how to implement however. Where exactly would this replace formula be placed?
I don't think it can precede the Input tool, which is where the data is being read into the macro.
Many thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @HenpetsGordres1, assuming you are looking to read in excel data into Alteryx, would the attached solution work in your case?
Same as your approach,
- it passes <List of Sheet Names> to macro 1
- then replaces this string with the corresponding sheet names within the formula tool
- which in turn is passed through the second macro to bring in the data
Let us know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Worked perfectly! Many thanks for taking to time to create and comment this workflow.
