I
I
Ilya Magdenko2021-01-06 02:46:20
excel
Ilya Magdenko, 2021-01-06 02:46:20

How to automatically update data from an external source without opening excel?

Hello,

I have an excel (.xlsx) file, it has many sheets with tables that are based on data from an external SQL database. The file is stored in the cloud in OneDrive (I can also store it in SharePoint, if it's easier).
Now I have to open the file and press the refresh button to update the data (or on opening).

How can I make it so that the data in the file itself is updated, let's say every 30 minutes? The built-in automatic update functionality only works if the file is open.

Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Grigory Boev, 2021-01-06
@ProgrammerForever

You answered your own question - open every 30 minutes and set automatic updates. The only thing left to do is to automate it. I would do this: create a folder in which I would throw such files (if there are several of them). Next - a script or a program that would periodically run all files in the background (for example, there are VBS scripts that can do this, or create everything in a bat file, or make a program in any programming language, it's already a matter of taste) . And it remains to close the file after synchronization. Here, either by time, or in the file itself after synchronization (only somehow you need to track that this is automatic synchronization, and not just working with the file - so that you can work with it in normal mode) - there are many options, for example, command line parameters to track from within,

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question