Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
open excel 2007 refresh query from batch file
Hello all,
I have a simple script saved as "C:\refresh_excel.vbs" that opens an Excel file, and does a refresh for a query on Sheet 1. I created a scheduled task to run this every day. It worked fine for previous versions of Excel, but since I have upgraded to Excel 2007 it doesn't work. Any help it helping me figure this out would be appreciated. /*contents of refresh_excel.vbs*/ Set objExcel = CreateObject("Excel.Application") objExcel.Visible = True Set objWorkBook = objExcel.Workbooks.Open("C:\reports\UPS.xls") objWorkbook.Sheets("Sheet1").QueryTables(1).Refres h Wscript.Sleep 6000 objWorkbook.save objWorkbook.close objExcel.Quit |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 vba - Refresh after web query? | Excel Programming | |||
Auto Open file VBA Refresh MS Query Save Close | Excel Programming | |||
How to refresh a Excel workbook with pivot & ADO query report in batch mode | Excel Discussion (Misc queries) | |||
How to refresh a Excel workbook with pivot & ADO query report in batch mode | Excel Programming | |||
How can I batch open a txt file in excel 2003 and save back as a . | Excel Discussion (Misc queries) |