ExcelScript.SortBy enum
Representa a direção da ordenação.
Comentários
Usada por
Exemplos
/**
* This script shows how to use setAutoSortOnCell to automatically sort
* a PivotTable's row labels based on values in a specific data column.
*/
function main(workbook: ExcelScript.Workbook) {
// Get the "Farm Pivot" PivotTable.
const pivotTable = workbook.getPivotTable("Farm Pivot");
const sheet = pivotTable.getWorksheet();
// Get the PivotTable's layout object.
const layout = pivotTable.getLayout();
// Pick a cell in the PivotTable's data area to sort by.
const sortCell1 = sheet.getRange("N6");
layout.setAutoSortOnCell(sortCell1, ExcelScript.SortBy.descending);
}
Campos
| ascending | Ordenação ascendente. Do menor para o maior ou de A a Z. |
| descending | Ordenação descendente. Do maior para o menor ou de Z a A. |