Can anyone help me with this PowerShell issue?

A

Andras_FTC

There's a PowerShell command I use to start updating an excel file very morning. It worked until yesterday, when I got a Windows update. Since then, I can't do it.The commands I run:$excel = new-object -comobject excel.application$workbook = $excel.workbooks.open("{Input}")$excel.Run(“Update_date”)$excel.Run(“UpdateData”)$workbook.close()$excel.quit()The error I got:ErrorsYou cannot call a method on a null-valued expression.Exception calling "Run" with "1" argument(s): "Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type 'Microsoft.Office.Inter

Continue reading...
 
Back
Top Bottom