• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Excel: hide multiple columns with Applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Excel: hide multiple columns with Applescript


  • Subject: Re: Excel: hide multiple columns with Applescript
  • From: David Wignall <email@hidden>
  • Date: Mon, 21 Mar 2011 22:21:31 +1300

On 21 Mar 2011, at 9:03 PM, Cameron Knowlton wrote:

> ah, but that will hide the entire pivot field... I only want to hide a certain number of pivot items (visually, columns of that pivot field).

set Pivot_Table to pivot table 1 of active sheet
-- pivot table 1 of active sheet

name of column fields of Pivot_Table
-- {"Salesperson"}

set Column_Field to column field "Salesperson" of Pivot_Table
-- column field "Salesperson" of pivot table 1 of active sheet

name of pivot items of Column_Field
-- {"Andrew Fuller", "Anne Dodsworth", "Janet Leverling", "Laura Callahan", "Margaret Peacock", "Michael Suyama", "Nancy Davolio", "Robert King", "Steven Buchanan"}

repeat with Item_Name in {"Andrew Fuller", "Anne Dodsworth", "Laura Callahan"}
	set visible of pivot item Item_Name of Column_Field to false
end repeat

All of which works but when I tested with a different field, one with 89 items it took a noticeable time, complete with SPOD but less than 1 minute, to create the list of names. However it took no real time at all to hide all those fields, so if you already know the names then that's irrelevant. (Errored on the last one because at least 1 field must be visible).

--
Dave

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Excel: hide multiple columns with Applescript
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: Office 2011 and Applescript (From: Stan Cleveland <email@hidden>)
 >Re: Office 2011 and Applescript (From: Barry Wainwright <email@hidden>)
 >Re: Office 2011 and Applescript (From: Christian Prinoth <email@hidden>)
 >Re: Office 2011 and Applescript (From: Christian Prinoth <email@hidden>)
 >Excel: hide multiple columns with Applescript (From: Cameron Knowlton <email@hidden>)
 >Re: Excel: hide multiple columns with Applescript (From: David Wignall <email@hidden>)
 >Re: Excel: hide multiple columns with Applescript (From: Cameron Knowlton <email@hidden>)

  • Prev by Date: Re: copy url rom safari to firefox issue
  • Next by Date: Re: copy url rom safari to firefox issue
  • Previous by thread: Re: Excel: hide multiple columns with Applescript
  • Next by thread: Re: Excel: hide multiple columns with Applescript
  • Index(es):
    • Date
    • Thread