General information
Category:
COM/DCOM and OLE Automation
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only