I have a code to refresh one report using VBScript and run the other batch file to run this refresh.
Below is my VBScript
Set objExcel = CreateObject("Excel.Application")
On Error Resume Next
objExcel.Visible = False
Set objWorkbook = objExcel.Workbooks.Open("C:\Users\Desktop\Test.xlsx")
objWorkbook.RefreshAll
objExcel.DisplayAlerts = True
objWorkbook.Save
objWorkbook.close False
objExcel.Quit
and below is my Batch Script
cscript refresh_excel.vbs
date /T
Time /T
pause.
Now I need to refresh several Excel reports on different paths. The reports are all located in different paths; some of them are located in the shared folder, which I already test this combination can refresh file in share folder too.
The current solution I have is to create a speared VBScript for each file and run a multi .vbs file using my batch file.
Any more adequate and effective idea of doing this?