Excel Pivot Table via AppleScript
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