I have a script with I use to create a excel file, I can run the script in server without any issue it creates the result file. But when I schedule the script, it’s not working.. I get the following error.. Can someone help me to fix this issue?
I am using.. Windows 2008 R2 Standard Office 2010
Error
**********************
Windows PowerShell Transcript Start
Start time: 20130724072922
Username : Test\subash
Machine : LAB01 (Microsoft Windows NT 6.1.7600.0)
**********************
Transcript started, output file is C:\TEMP\Temp.log
Exception calling "InvokeMember" with "6" argument(s): "SaveAs method of Workbook class failed" At C:\temp\test.ps1:40 char:42 + [void]$wkbk.PSBase.GetType().InvokeMember <<<< ("SaveAs",[Reflection.BindingFlags]::InvokeMethod, $null, wkbk, $sfile, $newci) + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : otNetMethodTargetInvocation **********************
Windows PowerShell Transcript End
End time: 20130724072930
**********************