Alteryx Designer Desktop Discussions

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

Using an output to Excel tool inside a batch macro

w_chivers
Meteoro

Hi community, 

 

My question I hope is a simple one - is it possible to use a output to Excel tool inside a batch macro?

 

What I'm trying to achieve is to convert multiple XML files (each with a different schema) into Excel files.  To do so, I have used a batch macro in the image to process each file being input via a directory tool to allow for the different schemas. 

 

For each file I want to process the file via XML, identify columns in that file that contain null values for all rows, remove those columns and then export the file to Excel and then repeat the process for file 2, file 3 etc.  Each input file has a different schema and I'd expect each output would have a different number of columns and column order...

 

I have managed to process the files and remove the columns but unable to export each individual file to Excel, nothing is exported when running the macro.  What's missing her?  When I use a Output macro tool all the columns in each of the files (null and non-columns) are added back in to the file and the process of removing the columns is moot.

 

Any thoughts would be appreciated. I've been scratching my head with this one! 

 

batch_macros_1.png

3 RESPUESTAS 3
FinnCharlton
Púlsar

@w_chivers, when you run the workflow with the macro open, are any files written?

gabrielvilella
Magnetar

Yes it is possible to output to an Excel from within a batch macro. The only reason for this not to work I assume is not having data. I'd need to see the file or more information on this to understand what is the issue. 

w_chivers
Meteoro

Hi Finn, I've got both workflows open the macro and the workflow referencing the macro itself.  Perhaps I need to close the macro tab before running?

Etiquetas