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

Alteryx Designer Desktop Discussions

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

Running a wizard through an excel macro

ma0ffst
5 - Atom

Hi guys,

 

I have a wizard set up which when run, given the user a dropdown and runs a process based on their choice. The wizard runs fine when run as a stand alone.

 

I'm now trying to run the wizard through an excel macro.

 

I've set up a button in excel that the user can press, and I've used the following code which I've stolen from elsewhere:

RetVal = ShellAndWait("""C:\Program Files\Alteryx\Engine\AlteryxEngineCmd.exe"" ""C:\MyWizard.yxwz""", 0, vbNormalFocus, PromptUser)

 

What this does though, it runs the module, but doesn't pop up with the box allowing the user to choose a value, which means that ultimately, the process doesn't work as expected.

 

Please can someone help?

 

Many many thanks in advance!

4 REPLIES 4
jdunkerley79
ACE Emeritus
ACE Emeritus

The AlteryxEngineCmd requires an Automation license.

 

Check you have API and Command Line turned on by going to Options -> Manage Licenses:

2017-10-19_07-11-06.jpg

 

In addition, it won't give user interaction. with the App If you want the user to run the wizard just call the AlteryxGui like:

 

Sub test()
    RetVal = ShellAndWait("""C:\Program Files\Alteryx\bin\AlteryxGui.exe"" ""C:\MyWizard.yxwz""", 0, vbNormalFocus, PromptUser)
End Sub

 

ma0ffst
5 - Atom

Thank you!

 

That works!

 

Just another quick question - how can I disable the screen that asks the user whether they want to open the output file?

 

Ideally they'd run the wizard through the macro, and the wizard would then close (as it writes output to a different file).

 

Thanks!

jdunkerley79
ACE Emeritus
ACE Emeritus

Within the Alteryx Designer, edit the Analytic App and go to the Interface Designer and untick all the 'On Success' options.

 

By default it shows the output but once unticked should just close after.

Vladdd
5 - Atom

Hi jdunkerley79,

 

I'm getting the error message below when I try to use your code:

clipboard_image_0.png

 

Also, should I have API Licence for this?

 

Thanks

Best Regards

Labels
Top Solution Authors