Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Batch Macro Error - "No sheet specified"

HenpetsGordres1
8 - Asteroid

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.

 

Capture.PNG

 

I am selecting full path:

 

Capture.PNG

 

Within the macro the settings are as follows:

 

Untitled.png

 

<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.

 

Untitled.png

 

Any help is greatly appreciated.

 

Many thanks

 

 

 

4 REPLIES 4
Jonathan-Sherman
15 - Aurora
15 - Aurora

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

HenpetsGordres1
8 - Asteroid

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.

 

HenpetsGordres1_0-1588089376587.png

 

Many thanks

 

AbhilashR
15 - Aurora
15 - Aurora

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.

HenpetsGordres1
8 - Asteroid

Worked perfectly! Many thanks for taking to time to create and comment this workflow.

Labels