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?
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.
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.
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.
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
@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
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.