Alteryx Designer Desktop Discussions

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

Alteryx flow - run VBA Macro and use generated files for further work

GregorB
5 - Atom

Hello,

I'm seeking an automated solution for my workflow. Currently, I have an Excel VBA macro that exports five different files from the SAP system. I manually execute this macro, and then proceed to an Alteryx workflow where the five files are combined to generate a report. How can I integrate the automatic execution of the VBA macro directly within Alteryx?

 

The macro exports files weekly in that way:

example:

C:/USER/DATA/W1/SEL1.xlsx

C:/USER/DATA/W1/SEL2.xlsx  ... (next week the macro will create W2 folder and so on)

 

In my Alteryx flow I have dynamic input reading so it also recognizes folder week numbers and the exported files (SEL1.xlsx, SEL2.xlsx,...) which macro creates.

 

Is there a chance that I somehow implement the "Run Command" tool in my Alteryx workflow?

 

Thanks in advance!

 

G

2 REPLIES 2
rzdodson
12 - Quasar

@GregorB you are definitely on the right track with Run Command. It'll be able to execute VBA macros via a VBS file that is built in to your Run Command tool's configuration. 

Data Meaning put out a great video roughly two years ago around the subject: https://www.youtube.com/watch?v=dCq85G9YGQ4

It provides a great guide to get you set up.

GregorB
5 - Atom

Hi,

 

thanks for a fast reply.

 

I've reviewed the video, but I'm unsure how to integrate it into my workflow. Specifically, I need the flow to pause until the macro completes the exports, and then resume its tasks.

 

As you can see on the picture below, I have text input

example:

C:/USER/DATA/W

Following that, the formula tool determines the current week number, and the dynamic input tool opens the corresponding week file.

 

 

Labels