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. |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Scripts