Alteryx Designer Desktop Discussions

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

Having VBA Scripts as input for the flow.

varun_sub
メテオロイド

Hello Everyone,

    In one of the use cases that I am currently working on, the first step is to run VBA scripts which give the excel files which are the input data for the workflow. I am new to Alteryx. I referred to a few examples but they were a bit different from what I need. So if possible, can anyone please show me an example workflow on how to do it, if possible? 

6件の返信6
Luke_C
キャスター

Hi @varun_sub 

 

I've only done this with running vba scripts after a workflow, but the same principles should apply. You could try creating an event that runs before the workflow to run your VBA script. This would be done by creating a .bat file. The syntax of the .bat file that I got to work is: start "" "Full File Path of .vbs file". Your .VBS file would then be called to run. The one potential challenge I see with this would be the Alteryx running before the vba script finishes, so some delay may need to be built into the process.

 

 

Luke_C_0-1623072569537.png

 

varun_sub
メテオロイド

Hi@ Luke_C,

  Thanks a lot for the response. Sorry, I was unwell and hence couldnt respond sooner. I created the event as you suggested. My current flow is as attached. I have also attached snips of what my parameters are. Can you let me know where I am going wrong.IMG_20210609_104955.jpgIMG_20210609_104938.jpgIMG_20210609_104948.jpgIMG_20210609_104926.jpg

Luke_C
キャスター

Unfortunately it's tough for me to follow exactly what's going on or what the error message you're getting is by these screenshots. If you're able to provide some sample data and describe the requirements a bit more I'm sure someone here can help get a solution. 

BrandonB
Alteryx
Alteryx

This is one of the best articles I have found for running VBA https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Alteryx-Run-Command-Executing-Excel... 

 

It walks you through the process step by step

varun_sub
メテオロイド

@Luke_C Hello Luke, I have attached the input vbs script file as a txt file since it doesn't allow it. The output would be csv files which needs to be uploaded to s3 bucket. I tried many things and it still throwing an error. Can you please send me a workflow doing the above?

 

Regards,

Varun 

Luke_C
キャスター

Hi @varun_sub 

 

What you could try is creating a .bat file that runs this vb script. I provided the syntax in my original reply. Then, in the events pane browse for that .bat file and set it to run 'before run' so it executes before the workflow starts. The events menu is accessible via the workflow configuration panel. Click Add and then populate the pop-up shown below. You should only need to input the filepath of the bat file. The article @BrandonB posted also has a lot of great info. I've only done this on the output side of a workflow but this should get you something to work with, unfortunately I don't have access to whatever your vb script is trying to do, seems like an interesting challenge. 

 

Luke_C_0-1623329264245.png

 

ラベル