Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

Run command won't run in Alteryx server

Meiye
7 - Meteor

Hi all, 

 

I have a run cscript to run an Excel macro, it works well when running in the Alteryx Designer Desktop. so I uploaded it onto the server and scheduled it to run, but it doesn't do what it's supposed to do - the workflow was "completed" but no files were produced, and no error messages. What's the potential cause for this?

 

The workflow is a single run command tool, no input or output. 

Meiye_0-1686129283376.png

Thanks.

 

6 REPLIES 6
DanielvanLeuzen
8 - Asteroid

You will need an input and an output.

I recommend you to read the following article:
Alteryx Run Command: Executing Excel Macros (VBA) - Alteryx Community

From here you can also download the example workflow 

 

oneillp111
9 - Comet

@Meiye, what is the batch command? and Also check with the server Admin, in order to run the excel macro, the server needs to have excel installed.  In my case, my server does not have excel installed, 

fmvizcaino
17 - Castor
17 - Castor

Hi @Meiye ,

 

Possibly something related to the paths. 

Could you please share the script so we can take a further look?

 

Best regards,

Fernando Vizcaino

Meiye
7 - Meteor

Hi @fmvizcaino , 

 

Here is the screen shot... I don't need either the "Write source" or the "Read Result" but when I leave both of them blank there's an error message... so they are basically place holders. but it does work when I run it in the designer desktop.

 

Meiye_0-1686144739256.png

 

fmvizcaino
17 - Castor
17 - Castor

Just read your previous message and you are right. I had this error before where a vbs script was not running but also not showing any errors and it was related to not having Excel installed on the server.

Brian_Denso
6 - Meteoroid

Run Command.PNG

I'm having the same issue.  I have a Run Command workflow.  When I run it on my local computer, works fine.  When I run it on the server Designer version it works fine and creates the expected excel file.  When I run in the gallery, it executes successfully but the excel file is not created.  The excel macro is manipulating some data and saving off a new file.  I've attached the run command info as well as the vb script code.

'Input Excel File's Full Path
ExcelFilePath = "C:\Test_Files\Template\Template.xlsm"

'Input Module/Macro name within the Excel File
MacroPath = "Module1.Save"

'Create an instance of Excel
Set ExcelApp = CreateObject("Excel.Application")

'Do you want this Excel instance to be visible?
ExcelApp.Visible = True 'or "False"

'Prevent any App Launch Alerts (ie Update External Links)
ExcelApp.DisplayAlerts = False

'Open Excel File
Set wb = ExcelApp.Workbooks.Open(ExcelFilePath)

On Error Resume Next
'Execute Macro Code
ExcelApp.Run MacroPath

'Save Excel File (if applicable)
wb.Save

'Reset Display Alerts Before Closing
ExcelApp.DisplayAlerts = True

'Close Excel File
wb.Close

'End instance of Excel
ExcelApp.Quit