Search code examples
sqlexcelrefreshpowerpivot

Refreshing Power Pivot automatically


I hope that you can help me. That's my situation: daily I'm importing in Power Pivot some data through a query on a SQL database. Actually every morning I open the Power Pivot and I refresh it for import the data of the previous day present in the database.

This action require 20 minutes because I have a lot of data to import.

I was wondering if there is a way to do this action during the night, maybe an automatic refresh, so that I can open the file in the morning and I alredy have the data of the previous day.

I hope that I was clear with my request, thanks in advice.


Solution

  • If the Excel workbook is on a machine that does not shut down, you can keep the workbook open and configure the query to automatically refresh ever x minutes.

    Or you can keep the workbook open and run VBA code to refresh the query on a timer. There are plenty of examples for VBA timers if you just care to search.

    Or you can configure the queries to refresh automatically when the file is opened, then create a Windows Task Scheduler job to open the workbook at a specific time. Again, the computer running this must be turned on.

    You see that there are many options and they are all well documented and just a short google search away.