Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP to Excel Pivot Tables
Message
From
22/01/2002 14:57:07
Gary Otte
California Youth Authority
Sacramento, California, United States
 
 
To
22/01/2002 13:18:08
Todd Cottengim
Alpine Land Information Services
Redding, California, United States
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00608533
Message ID:
00608593
Views:
13
Todd,

I've created an Excel spreadsheet via VFP code, then used the following code to create a Pivot Table based on that:

*!* Create pivot table ... Status by Facility
loExcel.Sheets("Applicants").SELECT && Select the spreadsheet
loExcel.Sheets("Applicants").RANGE("A5").SELECT && Select a cell within the data list

loExcel.ActiveSheet.PivotTableWizard.NAME = "PivotTable3" && Initialize the pivot table

loExcel.ActiveSheet.PivotTables("PivotTable3").AddFields("Facility","Selection Status") && Use Facility for rows, Status for columns

loExcel.ActiveSheet.PivotTables("PivotTable3").PivotFields("Last Name").ORIENTATION = 4 && Fill in table with counts of Last Name

loExcel.ActiveSheet.PivotTables("PivotTable3").NULLSTRING = "0" && Show 0 in empty cells


Hopefully this gives you some ideas of things to try.

Gary
Previous
Reply
Map
View

Click here to load this message in the networking platform