Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-30-2013, 10:18 AM
bremen22 bremen22 is offline Auto Refresh Pivot Table on Timer Windows 7 64bit Auto Refresh Pivot Table on Timer Office 2007
Advanced Beginner
Auto Refresh Pivot Table on Timer
 
Join Date: Jul 2013
Posts: 44
bremen22 is on a distinguished road
Question Auto Refresh Pivot Table on Timer

Good afternoon all,



For the past few weeks I have been creating some real time dash boards for my company. The data is pulled in via a query to an oracle database. That data drives several pivot tables and pviot charts. I have set options that refresh the data from the oracle database every 5 minutes. I have been trying all day to find something that will refresh the pivot tables every 6 minutes.

is this possible?
Reply With Quote
  #2  
Old 09-30-2013, 02:30 PM
BobBridges's Avatar
BobBridges BobBridges is offline Auto Refresh Pivot Table on Timer Windows 7 64bit Auto Refresh Pivot Table on Timer Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

I don't know from pivot tables, bremen22—I never use them—but if we're talking about a general capability to execute some action every so often, there are several ways to go about it.

1) If the workbook need be updated only if someone's actually looking at it (which seems pretty likely), I should think you could create a macro that runs automatically upon certain events. For instance, here's one (the Workbook.RowSetComplete event) that is "raised when the user either drills through the recordset or invokes the rowset action on an OLAP PivotTable". If the user might be typing stuff in there, you could use a Change event. If he's not typing anything but just moving the cursor around, there's a SheetSelectionChange event. Whatever you like, the point is that you can write a macro that runs whenever this event occurs; the macro would check the time to see whether it should get fresh data from Oracle.

I've never done this, I'm just hypothesizing. There may be better ways.

2) If the user opens the workbooks for read-only, you could write the refresh in VBScript (it's all the same objects so the code would be almost identical, it just runs from outside Excel) and then have that script be triggered by a Windows scheduler of some sort. But that works only if no one's got the workbook open for editing.

3) If you write a worksheet function and make it volatile, it'll run whenever any recalc at all is done in the workbook. (I think workbook; maybe only in the active worksheet.) Mostly Excel can tell whether a formula needs to be recalculated, based on whether any of its arguments refer to other cells; but certain functions such as Now() and Rand() change every time anything else is recalculated, and you can tell Excel to treat your home-grown function the same way. Then the function would be able to refresh the data. ...Or maybe not; functions operate under severe limitations as to what they can do outside the cell they're called from. You might have to experiment with that.

Any of those sound interesting? And to anyone else out there who writes VBA: I expect you're already champing at the bit to explain to bremen and me why all these ideas are terrible. Sound off without worrying over-much about being polite; I've never had to write a routine like this, so there are probably better ways than the first three ideas I got off the top of my head.
Reply With Quote
  #3  
Old 10-01-2013, 01:00 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Auto Refresh Pivot Table on Timer Windows 7 64bit Auto Refresh Pivot Table on Timer Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,777
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Perhaps using the Windows Timer in VBA as described here under " Using Windows Timer" could get you on track
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot Table uhlersa Excel 0 10-15-2012 12:01 PM
Pivot table help TishyMouse Excel 2 04-27-2012 10:19 AM
Auto Refresh Pivot Table on Timer pivot table aliasadi_07 Excel 1 03-11-2012 12:49 AM
Auto Refresh Pivot Table on Timer Pivot Table Karen615 Excel 5 08-03-2011 10:46 AM
Pivot Table Refresh tpcervelo Excel 0 09-14-2010 06:54 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:08 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft