ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Auto update pivot tables. (https://www.excelbanter.com/excel-programming/277860-auto-update-pivot-tables.html)

Tony

Auto update pivot tables.
 
Hi,

I need a spreadsheet that reads an external data source to be updated befor
being sent by email.


I have a spreadsheet saved as an xlt.
It contains three pivot tables which connect to CSV data files using
Microsoft
Text Driver.
The CSV files are updated overnight by an external application.
The Excel file is in \\Server\Viewers
The Data files are in \\Server\Data

Local users use a shortcut to open the Excel file on \\Server\Viewers which
the does an auto-update from the CSV files.
That way the the pivot table data is always updated.
(Because I used the auto-update when opening option when I saved the
original Excel file)
All that has been working perfectly for years, locally.

Now I need to send the same excel file to another company by email.
I have succeeded in writing a vbscript that creates a message body and sends
the message and the excel file via SMTP.
Q.1. Does the Excel file do an autoupdate before being sent ?
Q.2 If not, how can I force it to autoupdate itself so the mail recipient
will have the updated version of the data.

I supposed I could get the vbscript to open the file and go into each Pivot
table and do a Refresh (F9), but is there an easier way ?


TIA


Seamus
(I posted this yesterday to excel.misc but got no answers.)



Tom Ogilvy

Auto update pivot tables.
 
Open the file and do an
ActiveWorkbook.refreshall.

--
Regards,
Tom Ogilvy

"Tony" wrote in message
...
Hi,

I need a spreadsheet that reads an external data source to be updated

befor
being sent by email.


I have a spreadsheet saved as an xlt.
It contains three pivot tables which connect to CSV data files using
Microsoft
Text Driver.
The CSV files are updated overnight by an external application.
The Excel file is in \\Server\Viewers
The Data files are in \\Server\Data

Local users use a shortcut to open the Excel file on \\Server\Viewers

which
the does an auto-update from the CSV files.
That way the the pivot table data is always updated.
(Because I used the auto-update when opening option when I saved the
original Excel file)
All that has been working perfectly for years, locally.

Now I need to send the same excel file to another company by email.
I have succeeded in writing a vbscript that creates a message body and

sends
the message and the excel file via SMTP.
Q.1. Does the Excel file do an autoupdate before being sent ?
Q.2 If not, how can I force it to autoupdate itself so the mail recipient
will have the updated version of the data.

I supposed I could get the vbscript to open the file and go into each

Pivot
table and do a Refresh (F9), but is there an easier way ?


TIA


Seamus
(I posted this yesterday to excel.misc but got no answers.)





Tony

Auto update pivot tables.
 
Thanks Tom,
Could you tell me how to do that from a vbscript ????
Please.

Seamus



"Tom Ogilvy" a écrit dans le message de
...
Open the file and do an
ActiveWorkbook.refreshall.

--
Regards,
Tom Ogilvy

"Tony" wrote in message
...
Hi,

I need a spreadsheet that reads an external data source to be updated

befor
being sent by email.


I have a spreadsheet saved as an xlt.
It contains three pivot tables which connect to CSV data files using
Microsoft
Text Driver.
The CSV files are updated overnight by an external application.
The Excel file is in \\Server\Viewers
The Data files are in \\Server\Data

Local users use a shortcut to open the Excel file on \\Server\Viewers

which
the does an auto-update from the CSV files.
That way the the pivot table data is always updated.
(Because I used the auto-update when opening option when I saved the
original Excel file)
All that has been working perfectly for years, locally.

Now I need to send the same excel file to another company by email.
I have succeeded in writing a vbscript that creates a message body and

sends
the message and the excel file via SMTP.
Q.1. Does the Excel file do an autoupdate before being sent ?
Q.2 If not, how can I force it to autoupdate itself so the mail

recipient
will have the updated version of the data.

I supposed I could get the vbscript to open the file and go into each

Pivot
table and do a Refresh (F9), but is there an easier way ?


TIA


Seamus
(I posted this yesterday to excel.misc but got no answers.)








All times are GMT +1. The time now is 02:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com