Oct 14 2017 02:10 AM
Hi Community,
I am using an excel workbook to grab data from an accounting system via an ODBC32 bit connection.
Is there a way to schedule these ODBC connections inside the workbook to refresh the data and resave the workbook at a regular interval?
Thanks for any advice in advance!
Cheers
Garry
Oct 16 2017 12:39 AM
SolutionOct 17 2017 04:26 AM - edited Oct 17 2017 04:34 AM
Hi @JKPieterse
thanks for the reply. I saw your VB code but my skills in this area aint that good. I probably need to study more ..lol
I have a lot of SQL queries in the work book to update each one's properties would take a bit of time. Each queries connects to an accounting data table like accounts, jobs, journals, items, itemsales etc,
I ended up doing a vbscript below which i scheduled in the task manager to each time period.
Set xl = CreateObject("Excel.Application")
Set wb = xl.Workbooks.open("C:\Users\Garry\Desktop\Test\PRIMETEST.xlsx")
xl.DisplayAlerts= False
WScript.Sleep 1000
wb.RefreshAll
WScript.Sleep 10000
wb.Save
wb.Close
xl.Quit
This works okay with a file stored on a local disc.
Are there better ways to do this and access the refresh all and save on an excel file stored on say:
1. One Drive Personal or Business
2. Share Point Online
I am considering Power Update software which also works on Power Bi desktop files as it looks like it handles all the scenarios.
https://powerpivotpro.com/2015/02/introducing-power-update/
Its free for a single file.
Oct 18 2017 02:08 AM
Mar 07 2024 12:39 AM
Please can you share photos steps to be more cleared , thank you @JKPieterse
Oct 16 2017 12:39 AM
Solution