Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

SQL Job to run powershell modifying excel

$
0
0

Hello Forum Readers,

I am in a bit of unchartered waters when it comes to what I am looking to accomplish. I have an excel chart that needs to be updated through powershell. The script runs fine when launched personally, now I want to create a SQL job to execute it on a schedule. The catch is Office is not installed on the server. Any one know of a work around? here is what I am doing:

$objectExcel = new-object -comobject excel.application $objectExcel.displayAlerts = $false $Classes = $objectExcel.workbooks.open("T:\Shared Information\WorkingLinkedFiles\ExeChart_Linked_Sb1.xlsm", $null, $true) $objectExcel.run("UpdateChart") $Classes.close($false) $objectExcel.quit() spps -n excel

any suggestions are appreciated.

RP



Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>