+ Reply to Thread
Results 1 to 3 of 3

Pivot Table Autofilters Not Clearing On Refresh

  1. #1
    Registered User
    Join Date
    07-31-2007
    Posts
    5

    Pivot Table Autofilters Not Clearing On Refresh

    Hello,

    I have an application which presents an interface to users so they can select parameters for data retrieval. When they are satisfied with the parameters they have entered they then click a button which will cause data to be retrieved and displayed in an Excel app. Just for reference this is a production reconciliation report.

    The flow is:
    1) User requests report by entering in parms, clicking button.

    2) Data is retrieved

    3) Excel reconciliationMaster.xls file is copied to recon_<yyyy-dd-mm hh:mm:ss>.xls. (the master file template for all reports)

    ---- the copied file is used from this point on ----

    4) The program creates an Excel app

    5) The sheet which holds source data for pivot tables is cleared and repopulated with the newly retrieved data and the data range is redefined.

    6) The program walks through each pivot table in the file and performs a refresh.

    The problem is:
    The autofilters behave oddly. If I take an item and move it into the Page Field area, the data in the autofilter looks fine. If I take the same item and move it into the Column Fields area, the autofilter contains entries for the current data as well as any data which was contained in the master file. The data itself looks fine, it just looks like the autofilters are not being cleared for the Column Fields when a refresh is performed.

    I have googled and wandered through the object models (which I will continue to do), but I cannot see how to programmatically force a clear of the autofilter information for the Column Fields for a set of pivot tables.

    Any ideas?

    Thanks...

    Kim

  2. #2
    Cheeky Forum Moderator Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Pivot Table Autofilters Not Clearing On Refresh

    If I understand you correctly, the Pivot Table dropdowns contain obsolete items from previous refreshes.

    You have a couple options:
    1) Some time ago, I wrote PivotPlay, a free add-in that works on Pivot Tables. One of its features is that it clears obsolete items with the click of a button.
    It's available here:
    http://www.contextures.com/xlPivotPlay01.html

    2) See Debra Dalgleish's coverage of your issue and a few options on handling it.
    http://www.contextures.com/xlPivot04.html

    Does either of those help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    07-31-2007
    Posts
    5
    Excellent!

    Thank you. The clearing of the PivotCache.MissingItems was what I needed. Ignorance is not bliss.

    Kim

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

X vBulletin 4.1.8 Debug Information

  • Page Generation 0.05446 seconds
  • Memory Usage 8,875KB
  • Queries Executed 14 (?)
More Information
Template Usage (31):
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (1)footer
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (3)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (4)navbar_noticebit
  • (6)option
  • (3)postbit_legacy
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (4)showthread_bookmarksite
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper
  • (1)vbseo_linkbackmenu_entry 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (39):
  • ./vbseo.php
  • ./env.php
  • ./vbseo/includes/functions_vbseo.php
  • ./vbseo/includes/functions_vbseo_pre.php
  • ./vbseo/includes/functions_vbseo_url.php
  • ./vbseo/includes/functions_vbseo_createurl.php
  • ./vbseo/includes/functions_vbseo_db.php
  • ./vbseo/includes/functions_vbseo_vb.php
  • ./vbseo/includes/functions_vbseo_seo.php
  • ./vbseo/includes/functions_vbseo_misc.php
  • ./vbseo/includes/functions_vbseo_crr.php
  • ./vbseo/includes/functions_vbseo_cache.php
  • ./vbseo/includes/functions_vbseo_hook.php
  • ./vbseo/includes/functions_vbseo_startup.php
  • ./includes/config.php
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/functions.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/functions_cforum.php
  • ./includes/functions_facebook.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (46):
  • init_startup
  • friendlyurl_resolve_class
  • database_pre_fetch_array
  • database_post_fetch_array
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • fetch_musername
  • cache_templates
  • template_register_var
  • parse_templates
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • reputation_image
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • showthread_bookmarkbit
  • navbits
  • navbits_complete
  • showthread_complete


Search Engine Friendly URLs by vBSEO 3.6.0 RC 1