• 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
Excel Pivot Table via AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Excel Pivot Table via AppleScript


  • Subject: Excel Pivot Table via AppleScript
  • From: Dennis Christopher <email@hidden>
  • Date: Thu, 8 Jul 2010 14:04:06 -0400

I am trying to create a trivial pivot table with AppleScript for Excel 2008.
Please see the example below. I'm having a problem with subtotaling yielding a sum.


I creat the table with the following:

set PTable to make new pivot table at PTSheet with properties ¬
{source data:range "Data!A1:H29999", table range1:range "", name:PTTableName}


Then I add the ProdID field as a row field:

add fields to pivot table PTable row fields {"ProdID"} with add to table

But no matter how I try to add the Units_Sold data field, and set it subtotals, it gives me a count of the ProdID records
in the Total column, not the sum of the Units_Sold.


Any help towards how to specify the data area would be greatly appreciated.

Dennis Christopher

*************Example*************

Sheet:

ProdID	Units_Sold
100		2
100		3
200		5
200		12

Pivot Table:

Sum of Units_Sold
ProdID	Total
100		5
200		17 _______________________________________________
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
  • Prev by Date: checking GUI action status
  • Next by Date: text to aiff audio script step
  • Previous by thread: Re: checking GUI action status
  • Next by thread: text to aiff audio script step
  • Index(es):
    • Date
    • Thread