I'm attempting to run a simple VB script that opens an Excel 2007 spreadsheet, reads cell data and then echos it to the screen, however I get the following error:
UpdateTitle.vbs(4, 1) (null): The server threw an exception
Here is the code:
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = False
objExcel.Workbooks.Open("C:\Temp\ADUserUpdates\ADUserUpdates\qryEmployee.xlsx")
Set objSheet = objExcel.ActiveWorkbook.Worksheets(1)
Wscript.echo objSheet.Cells(1,2)
objExcel.ActiveWorkbook.Close
objExcel.Application.Quit
Script is being run on a WindowsXP SP3 machine in a corporate environment. If I run this same script on a machine with fresh install of Windows XP it runs fine but with the corporate image it does not. Domain GPOs have been eliminated, default local group policies have been restored and default security policies have been restored to corporate image but they have no effect. Not sure what else would be stopping this script from running. Any assistance would be greatly appreciated.