excel and xml - Add Stylesheet Reference with VBA
<p>I am importing and transforming XML into Excel using OpenXML:</p>

<pre><code>Workbooks.OpenXML Filename:=sPath, Stylesheets:=Array(1)
</code></pre>

<p>In the XML documents, I am inserting the stylesheet references (because they don't exist):</p>

<pre><code>&lt;?xml-stylesheet type='text/xsl' href='STIG_ckl.xsl'?&gt;
</code></pre>

<p>However, I'd like to think there is a way to use a stylesheet without having to have it in the XML document itself.</p>

<p>Using OpenXML, the "Array(1)" uses the first referenced stylesheet in the XML.</p>

<p>But I'd like to give it a stylesheet totally separate from what is in the XML, like: (but this doesn't work)</p>

<pre><code>Workbooks.OpenXML Filename:=sPath, Stylesheets:=sPathToXSL
</code></pre>

<p>Thanks. Sean.</p>