我有一個VBScript我一直在使用刷新我的Excel文件的外部數據,而無需實際打開它:調整一個VBScript來刷新目錄中的所有外部數據Excel文件
Dim oExcel
Set oExcel = CreateObject("Excel.Application")
oExcel.Visible = True
oExcel.DisplayAlerts = False
oExcel.AskToUpdateLinks = False
oExcel.AlertBeforeOverwriting = False
Set oWorkbook = oExcel.Workbooks.Open(FILE NAME GOES HERE)
oWorkbook.RefreshAll
oWorkbook.Save
oExcel.Quit
Set oWorkbook = Nothing
Set oExcel = Nothing
我不知道在哪裏或如何實現一個循環,因此將刷新它是在(即相對路徑)推出該目錄下所有的xlsx和XLS文件
請澄清你的問題之前,所有的數據更新。你如何運行?你到底想要做什麼?當你運行上面的腳本時會發生什麼? – Rich
如果我在目錄中刪除VBS文件,當它運行,做refreshall並保存在目錄 – Jsjjharp