This script will work when run manually but not when run by the Windows 7 64 bit task scheduler. It will run fine with the Windows 2003 Server task scheduler.
Save the following as test.vbs
---------------------------------------------------------
begin
Sub begin
Set excel = CreateObject("Excel.Application")
excel.DisplayAlerts=false
Set wb = excel.workbooks.open("C:\test.xlsx")
wb.sheets(1).cells(1,1).value="hello"
wb.save
wb.Close
excel.Quit
End Sub
Save the following as test.vbs
---------------------------------------------------------
begin
Sub begin
Set excel = CreateObject("Excel.Application")
excel.DisplayAlerts=false
Set wb = excel.workbooks.open("C:\test.xlsx")
wb.sheets(1).cells(1,1).value="hello"
wb.save
wb.Close
excel.Quit
End Sub