My Powershell (2.0) script has the following code snippet:
$fileName = \"c:\\reports\\1.xlsx\" $xl = new-object -comobject excel.application $xlFormat = [Mic
The solutions above didn't work in my SCSM 2012 Scorch environment, instead I used PSExcel (https://github.com/RamblingCookieMonster/PSExcel) which has no dependency on having Excel installed or the ComObject.