Running Excel macros from Jenkins
<p>I am trying to run Excel macros from a Jenkins Windows service on Windows 7 64-bit VM. I have a batch file that specifies VBS files. Then in the VBS files, the Excel macros are listed. The batch files run fine locally, but when I run it from Jenkins, I get the following error:</p>

<blockquote>
  <p>Microsoft VBScript runtime error: ActiveX component can't create object: 'Excel.Application'</p>
</blockquote>

<p>The error seems to occur on each instance of the following in the VBS files:</p>

<pre><code>Set xlApp = CreateObject("Excel.Application")
</code></pre>

<p>Just searching around, I see that lots of other people have had problems with the version of <code>cscript</code> being used to execute the VBS files. On 64-bit computers, it seems that the 32-bit version of <code>cscript</code> must be used. But no matter how I try to force that version of <code>cscript</code> to be used, Jenkins seems to ignore it and display the same error, which makes me think that the <code>cscript</code> version is not the cause of my error.</p>

<p>I do have macros enabled in Excel and checked the ActiveX settings too. Like I said, double-clicking the batch file, everything works fine. There's gotta be something weird Jenkins is doing to cause the problem.</p>

<p>Any ideas?</p>