Information générale
Catégorie:
COM/DCOM et 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
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement