ExcelScript.SubtotalLocationType enum
Remarks
Examples
/**
* This script displays group subtotals of the "Farms Sales" PivotTable.
*/
function main(workbook: ExcelScript.Workbook) {
// Get the PivotTable named "Farm Sales".
const pivot = workbook.getPivotTable("Farm Sales");
// Get the PivotLayout object.
const layout = pivot.getLayout();
// Show all the subtotals at the bottom of each group.
layout.setSubtotalLocation(ExcelScript.SubtotalLocationType.atBottom);
}
Fields
atBottom | Subtotals are at the bottom. |
atTop | Subtotals are at the top. |
off | Subtotals are off. |