<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Run Command tool not successfully executing excel macro through vb script in Alteryx Server Discussions</title>
    <link>https://community.alteryx.com/t5/Alteryx-Server-Discussions/Run-Command-tool-not-successfully-executing-excel-macro-through/m-p/1157484#M13711</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/445752"&gt;@Brian_Denso&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See if this helps.&amp;nbsp;&lt;A href="https://community.alteryx.com/t5/Alteryx-Server-Knowledge-Base/Workflow-with-VBScript-is-not-working-in-Alteryx-Server/ta-p/493518" target="_blank"&gt;https://community.alteryx.com/t5/Alteryx-Server-Knowledge-Base/Workflow-with-VBScript-is-not-working-in-Alteryx-Server/ta-p/493518&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Two quick tests would be to add your user as the run as or account running the AlteryxService service or open the server`s designer (shift + right click - run as a different user) with the run as/service account and test the same script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Fernando Vizcaino&lt;/P&gt;</description>
    <pubDate>Mon, 03 Jul 2023 17:50:06 GMT</pubDate>
    <dc:creator>fmvizcaino</dc:creator>
    <dc:date>2023-07-03T17:50:06Z</dc:date>
    <item>
      <title>Run Command tool not successfully executing excel macro through vb script</title>
      <link>https://community.alteryx.com/t5/Alteryx-Server-Discussions/Run-Command-tool-not-successfully-executing-excel-macro-through/m-p/1157471#M13709</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have a Run Command workflow.&amp;nbsp; When I run it on my local computer, works fine.&amp;nbsp; When I run it on the server Designer version it works fine and creates the expected excel file.&amp;nbsp; When I run in the gallery, it executes successfully but the excel file is not created.&amp;nbsp; The excel macro is manipulating some data and saving off a new file.&amp;nbsp; I've attached the run command image as well as the vb script code below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I confirmed that the server isn’t restricted. &amp;nbsp;I cannot figure out why it won’t work on Gallery.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'Input Excel File's Full Path&lt;BR /&gt;ExcelFilePath = "C:\Test_Files\Template\Template.xlsm"&lt;/P&gt;&lt;P&gt;'Input Module/Macro name within the Excel File&lt;BR /&gt;MacroPath = "Module1.Save"&lt;/P&gt;&lt;P&gt;'Create an instance of Excel&lt;BR /&gt;Set ExcelApp = CreateObject("Excel.Application")&lt;/P&gt;&lt;P&gt;'Do you want this Excel instance to be visible?&lt;BR /&gt;ExcelApp.Visible = True 'or "False"&lt;/P&gt;&lt;P&gt;'Prevent any App Launch Alerts (ie Update External Links)&lt;BR /&gt;ExcelApp.DisplayAlerts = False&lt;/P&gt;&lt;P&gt;'Open Excel File&lt;BR /&gt;Set wb = ExcelApp.Workbooks.Open(ExcelFilePath)&lt;/P&gt;&lt;P&gt;On Error Resume Next&lt;BR /&gt;'Execute Macro Code&lt;BR /&gt;ExcelApp.Run MacroPath&lt;/P&gt;&lt;P&gt;'Save Excel File (if applicable)&lt;BR /&gt;wb.Save&lt;/P&gt;&lt;P&gt;'Reset Display Alerts Before Closing&lt;BR /&gt;ExcelApp.DisplayAlerts = True&lt;/P&gt;&lt;P&gt;'Close Excel File&lt;BR /&gt;wb.Close&lt;/P&gt;&lt;P&gt;'End instance of Excel&lt;BR /&gt;ExcelApp.Quit&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2023 17:34:57 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Server-Discussions/Run-Command-tool-not-successfully-executing-excel-macro-through/m-p/1157471#M13709</guid>
      <dc:creator>Brian_Denso</dc:creator>
      <dc:date>2023-07-03T17:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Run Command tool not successfully executing excel macro through vb script</title>
      <link>https://community.alteryx.com/t5/Alteryx-Server-Discussions/Run-Command-tool-not-successfully-executing-excel-macro-through/m-p/1157484#M13711</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/445752"&gt;@Brian_Denso&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See if this helps.&amp;nbsp;&lt;A href="https://community.alteryx.com/t5/Alteryx-Server-Knowledge-Base/Workflow-with-VBScript-is-not-working-in-Alteryx-Server/ta-p/493518" target="_blank"&gt;https://community.alteryx.com/t5/Alteryx-Server-Knowledge-Base/Workflow-with-VBScript-is-not-working-in-Alteryx-Server/ta-p/493518&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Two quick tests would be to add your user as the run as or account running the AlteryxService service or open the server`s designer (shift + right click - run as a different user) with the run as/service account and test the same script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Fernando Vizcaino&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2023 17:50:06 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Server-Discussions/Run-Command-tool-not-successfully-executing-excel-macro-through/m-p/1157484#M13711</guid>
      <dc:creator>fmvizcaino</dc:creator>
      <dc:date>2023-07-03T17:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Run Command tool not successfully executing excel macro through vb script</title>
      <link>https://community.alteryx.com/t5/Alteryx-Server-Discussions/Run-Command-tool-not-successfully-executing-excel-macro-through/m-p/1157669#M13714</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/445752"&gt;@Brian_Denso&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Avoid full path for file names in objects deployed to the Server or Gallery, they will work fine in your local environment, while I doubt this folder (&lt;SPAN&gt;&lt;STRONG&gt;C:\Test_Files\Template&lt;/STRONG&gt;)&lt;/SPAN&gt; exist on the server; when deploying objects to the server-gallery any physical file reference should be relative to the folder hosting the workflow, and better when they dont venture to folder outside its home directory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hth&lt;/P&gt;&lt;P&gt;Arnaldo&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 05:31:24 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Server-Discussions/Run-Command-tool-not-successfully-executing-excel-macro-through/m-p/1157669#M13714</guid>
      <dc:creator>ArnaldoSandoval</dc:creator>
      <dc:date>2023-07-04T05:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Run Command tool not successfully executing excel macro through vb script</title>
      <link>https://community.alteryx.com/t5/Alteryx-Server-Discussions/Run-Command-tool-not-successfully-executing-excel-macro-through/m-p/1157808#M13720</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Fernando,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The workflow executes successfully, I'm assuming just the input/output version, but the macro itself isn't ran which creates the resulting excel file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to go the sever events and realized that there were some permissions errors within the registery that I was able to correct.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I have an application error for excel.&lt;/P&gt;&lt;P&gt;I'm unable to access the server right now due to company planned power outage but the error message is along the lines of:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Faulty Application: EXCEL.EXE, version 16.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to do some research on how to fix but was unsuccessful.&amp;nbsp; I'm thinking there are potentially more permissions that need to be corrected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Arnaldo,&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Without specifying which excel file to open, how will I get the vbscript to correctly choose the macro?&lt;/P&gt;&lt;P&gt;As for the file location, C:\Test_Files\Template does exist within my server environment.&amp;nbsp; I have been attempting to avoid any folder permisssion errors so I began saving documents to the C: Drive within the server environment.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 13:09:14 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Server-Discussions/Run-Command-tool-not-successfully-executing-excel-macro-through/m-p/1157808#M13720</guid>
      <dc:creator>Brian_Denso</dc:creator>
      <dc:date>2023-07-04T13:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Run Command tool not successfully executing excel macro through vb script</title>
      <link>https://community.alteryx.com/t5/Alteryx-Server-Discussions/Run-Command-tool-not-successfully-executing-excel-macro-through/m-p/1157816#M13721</link>
      <description>&lt;P&gt;&lt;SPAN&gt;You should consider using relative paths instead of full paths.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;'Get the folder path of the script
ScriptFolderPath = Left(WScript.ScriptFullName, InStrRev(WScript.ScriptFullName, "\"))

'Input Excel File's relative path
ExcelFilePath = ScriptFolderPath &amp;amp; "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
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The &lt;/SPAN&gt;ScriptFolderPath&lt;SPAN&gt; variable to construct the relative path to the Excel file, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This cript will work regardless of the server or gallery environment's folder structure.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 13:39:10 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Server-Discussions/Run-Command-tool-not-successfully-executing-excel-macro-through/m-p/1157816#M13721</guid>
      <dc:creator>nehakakar</dc:creator>
      <dc:date>2023-07-04T13:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: Run Command tool not successfully executing excel macro through vb script</title>
      <link>https://community.alteryx.com/t5/Alteryx-Server-Discussions/Run-Command-tool-not-successfully-executing-excel-macro-through/m-p/1157847#M13724</link>
      <description>&lt;P&gt;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/445752"&gt;@Brian_Denso&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is clear that it is a permission issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you could enable the option to&amp;nbsp;&lt;STRONG&gt;Allow users to select&lt;/STRONG&gt;&amp;nbsp;credentials, you could use your own credential in this specific workflow.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.alteryx.com/20221/server/select-workflow-credentials-setting-your-server" target="_blank"&gt;https://help.alteryx.com/20221/server/select-workflow-credentials-setting-your-server&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Fernando Vizcaino&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 14:51:55 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Server-Discussions/Run-Command-tool-not-successfully-executing-excel-macro-through/m-p/1157847#M13724</guid>
      <dc:creator>fmvizcaino</dc:creator>
      <dc:date>2023-07-04T14:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Run Command tool not successfully executing excel macro through vb script</title>
      <link>https://community.alteryx.com/t5/Alteryx-Server-Discussions/Run-Command-tool-not-successfully-executing-excel-macro-through/m-p/1158492#M13728</link>
      <description>&lt;P&gt;Fernando,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just to follow up, I have found the solution.&amp;nbsp; It was a permission issue.&amp;nbsp; The server was setup with a default user which needed to have permissions in the COM registries.&amp;nbsp; Originally, I only fixed the issues specific to my personal login and not the default user account.&lt;BR /&gt;&lt;BR /&gt;Here is the link I used to fix the permissions in case this comes up for anyone in the future.&amp;nbsp; My registries that needed permission were different from the link, but the process was the same.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://appuals.com/how-to-fix-the-application-specific-permission-settings-do-not-grant-local-activation-permission-for-the-com-server-application-error/" target="_blank" rel="noopener"&gt;How to Fix 'Application-specific permission settings' Error - Appuals.com&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;The application-specific permission settings do not grant Local Launch permission for the COM Server application with CLSID &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{21B896BF-008D-4D01-A27B-26061B960DD7}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;and APPID &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{03E09F3B-DCE4-44FE-A9CF-82D050827E1C}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;to the user NA\USER SID (S-1-5-21-1289235617-2937510960-3569147640-19828) from address LocalHost (Using LRPC) running in the application container Unavailable SID (Unavailable). This security permission can be modified using the Component Services administrative tool.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 02:00:00 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Server-Discussions/Run-Command-tool-not-successfully-executing-excel-macro-through/m-p/1158492#M13728</guid>
      <dc:creator>Brian_Denso</dc:creator>
      <dc:date>2023-07-06T02:00:00Z</dc:date>
    </item>
  </channel>
</rss>

