PDA

View Full Version : Sleeper: VBA script to open, refresh pivot and save the file



kadija
09-09-2005, 10:54 AM
Hi,
I am trying to automate one of the reports that I have.
I am wondering if it is possible to write a VBA script that will be executed on the SQL Server that will open the Excel file, refresh the pivot table and save the updated file.
So the SQL server table gets updated once a day and I want to automatically refresh the excel file that reads from that table when the table gets updated.

Any replies would be appreciated.

MWE
09-09-2005, 02:42 PM
Hi,
I am trying to automate one of the reports that I have.
I am wondering if it is possible to write a VBA script that will be executed on the SQL Server that will open the Excel file, refresh the pivot table and save the updated file.
So the SQL server table gets updated once a day and I want to automatically refresh the excel file that reads from that table when the table gets updated.

Any replies would be appreciated.
Conceptually there is no reason why this could not be done as long as the logic for where things are and what precisely you wish to have done is known. A few questions:

from where do you wish this VBA procedure to run. VBA is "internal" to an application, not really a standalone language like, say VB or C
do you want the appl that runs the proc to run "automatically" at some time each day? or will someone manually initiate things?