Alteryx Designer Desktop Discussions

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

Batch Macro Not Replacing Excel Worksheet Name with Control Parameter

Cpirino
8 - Asteroid

Hi everyone! I’m building a workflow (configured as a Batch Macro) that needs to save data into an Excel file, creating or updating multiple worksheets (one for each parameter).
This workflow also formats the Excel file with a multi-line header.

In my case, I want to replace the “Planilha1” part of the output path with a value received via a Control Parameter (for example, “Plan 02”). I set up the Action Tool to “Update Value with Formula,” using the Replace() function where “[#1]” is the parameter value. However, when I run the macro, Alteryx still creates the sheet named “Planilha1,” ignoring the parameter value I provided.

Has anyone experienced this or knows what might be missing so the macro actually replaces “Planilha1” with the Control Parameter’s text? I’m attaching my macro workflow here so you can see where I might have gone wrong. Thanks in advance for any help!

2 REPLIES 2
Qiu
21 - Polaris
21 - Polaris

@Cpirino 
I would use the "Numero da planilha" field in the end to generate the Full path including Sheet name rather than use the Control parameter, which is quite complex in this situation.
If you can provide the sample data file, we can dig more though.

0105-Cpirino.png0105-Cpirino-A.png

Cpirino
8 - Asteroid

I can’t use that option because I need to merge the header with the rest of the data. If I export everything at once, all the information remains in text format. Therefore, for each worksheet created, I need to define one range for the header and another for the data.

 

 

 

Labels
Top Solution Authors