From fd7772261b11dc14ebc0724fe779439246fdd343 Mon Sep 17 00:00:00 2001 From: Alex Jerabek Date: Tue, 2 Apr 2019 13:42:52 -0700 Subject: [PATCH] Updating Excel Preview APIs --- types/office-js-preview/index.d.ts | 234 ++++++++++++++++++++++------- 1 file changed, 181 insertions(+), 53 deletions(-) diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index 9dbf4dae12..32719bafe9 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -21967,6 +21967,14 @@ declare namespace Excel { * @beta */ readonly hasSpill: boolean; + /** + * + * Returns the distance in points, for 100% zoom, from top edge of the range to bottom edge of the range. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly height: number; /** * * Represents if all cells of the current range are hidden. Read-only. @@ -21995,6 +22003,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ readonly isEntireRow: boolean; + /** + * + * Returns the distance in points, for 100% zoom, from left edge of the worksheet to left edge of the range. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly left: number; /** * * Represents the data type state of each cell. Read-only. @@ -22056,6 +22072,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ readonly text: string[][]; + /** + * + * Returns the distance in points, for 100% zoom, from top edge of the worksheet to top edge of the range. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly top: number; /** * * Represents the type of data of each cell. Read-only. @@ -22071,6 +22095,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ values: any[][]; + /** + * + * Returns the distance in points, for 100% zoom, from left edge of the range to right edge of the range. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly width: number; /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * * @remarks @@ -22607,7 +22639,7 @@ declare namespace Excel { * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta */ - setCellProperties(cellPropertiesData: SettableCellProperties[][] | OfficeExtension.ClientResult): void; + setCellProperties(cellPropertiesData: SettableCellProperties[][]): void; /** * * Updates the range based on a single-dimensional array of column properties, encapsulating things like font, fill, borders, alignment, and so forth. @@ -22615,7 +22647,7 @@ declare namespace Excel { * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta */ - setColumnProperties(columnPropertiesData: SettableColumnProperties[] | OfficeExtension.ClientResult): void; + setColumnProperties(columnPropertiesData: SettableColumnProperties[]): void; /** * * Set a range to be recalculated when the next recalculation occurs. @@ -22631,7 +22663,7 @@ declare namespace Excel { * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta */ - setRowProperties(rowPropertiesData: SettableRowProperties[] | OfficeExtension.ClientResult): void; + setRowProperties(rowPropertiesData: SettableRowProperties[]): void; /** * * Displays the card for an active cell if it has rich value content. @@ -31592,7 +31624,7 @@ declare namespace Excel { readonly worksheet: Excel.Worksheet; /** * - * True if the PivotTable should use custom lists when sorting. + * Specifies whether the PivotTable allows values in the data body to be edited by the user. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -31614,7 +31646,7 @@ declare namespace Excel { name: string; /** * - * True if the PivotTable should use custom lists when sorting. + * Specifies whether the PivotTable uses custom lists when sorting. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -31686,7 +31718,7 @@ declare namespace Excel { context: RequestContext; /** * - * True if formatting will be automatically formatted when it’s refreshed or when fields are moved + * Specifies whether formatting will be automatically formatted when it’s refreshed or when fields are moved * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -31694,7 +31726,7 @@ declare namespace Excel { autoFormat: boolean; /** * - * True if the field list should be shown or hidden from the UI. + * Specifies whether the field list can be shown in the UI. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -31709,7 +31741,7 @@ declare namespace Excel { layoutType: Excel.PivotLayoutType | "Compact" | "Tabular" | "Outline"; /** * - * True if formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. + * Specifies whether formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -31717,14 +31749,14 @@ declare namespace Excel { preserveFormatting: boolean; /** * - * True if the PivotTable report shows grand totals for columns. + * Specifies whether the PivotTable report shows grand totals for columns. * * [Api set: ExcelApi 1.8] */ showColumnGrandTotals: boolean; /** * - * True if the PivotTable report shows grand totals for rows. + * Specifies whether the PivotTable report shows grand totals for rows. * * [Api set: ExcelApi 1.8] */ @@ -31752,7 +31784,7 @@ declare namespace Excel { set(properties: Excel.PivotLayout): void; /** * - * Gets the cell in the PivotTable's data body that contains the value for the intersection of the specified dataHierarchy, rowItems, and columnItems. + * Gets a unique cell in the PivotTable based on a data hierarchy and the row and column items of their respective hierarchies. The returned cell is the intersection of the given row and column that contains the data from the given hierarchy. This method is the inverse of calling getPivotItems and getDataHierarchy on a particular cell. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -31784,7 +31816,7 @@ declare namespace Excel { * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta * - * @param cell A single cell within the PivotTable data body to get the data hieararchy for. + * @param cell A single cell within the PivotTable data body. * @returns The DataPivotHierarchy object used to calculate the value in the specified cell. */ getDataHierarchy(cell: Range | string): Excel.DataPivotHierarchy; @@ -31802,8 +31834,8 @@ declare namespace Excel { * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta * - * @param axis The axis to get the PivotItems from. Must be either "row" or "column." - * @param cell A single cell within the PivotTable's data body to get the PivotItems for. + * @param axis The axis from which to get the PivotItems. Must be either "row" or "column." + * @param cell A single cell within the PivotTable's data body. * @returns A collection of PivotItems that are used to calculate the values in the specified row. */ getPivotItems(axis: Excel.PivotAxis, cell: Range | string): OfficeExtension.ClientResult; @@ -31813,8 +31845,8 @@ declare namespace Excel { * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * - * @param axis The axis to get the PivotItems from. Must be either "row" or "column." - * @param cell A single cell within the PivotTable's data body to get the PivotItems for. + * @param axis The axis from which to get the PivotItems. Must be either "row" or "column." + * @param cell A single cell within the PivotTable's data body. * @returns A collection of PivotItems that are used to calculate the values in the specified row. */ getPivotItems(axis: "Unknown" | "Row" | "Column" | "Data" | "Filter", cell: Range | string): OfficeExtension.ClientResult; @@ -31834,25 +31866,25 @@ declare namespace Excel { getRowLabelRange(): Excel.Range; /** * - * Sets an autosort using the specified cell to automatically select all criteria and context for the sort. + * Sets the PivotTable to automatically sort using the specified cell to automatically select all necessary criteria and context. This behaves identically to applying an autosort from the UI. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta * * @param cell A single cell to use get the criteria from for applying the autosort. - * @param sortby The direction of the sort. + * @param sortBy The direction of the sort. */ - setAutosortOnCell(cell: Range | string, sortby: Excel.SortBy): void; + setAutoSortOnCell(cell: Range | string, sortBy: Excel.SortBy): void; /** * - * Sets an autosort using the specified cell to automatically select all criteria and context for the sort. + * Sets the PivotTable to automatically sort using the specified cell to automatically select all necessary criteria and context. This behaves identically to applying an autosort from the UI. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * * @param cell A single cell to use get the criteria from for applying the autosort. - * @param sortby The direction of the sort. + * @param sortBy The direction of the sort. */ - setAutosortOnCell(cell: Range | string, sortby: "Ascending" | "Descending"): void; + setAutoSortOnCell(cell: Range | string, sortBy: "Ascending" | "Descending"): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. * @@ -32668,9 +32700,9 @@ declare namespace Excel { * * [Api set: ExcelApi 1.8] * - * @param sortby Represents whether the sorting is done in an ascending or descending order. + * @param sortBy Represents whether the sorting is done in an ascending or descending order. */ - sortByLabels(sortby: SortBy): void; + sortByLabels(sortBy: SortBy): void; /** * * Sorts the PivotField by specified values in a given scope. The scope defines which specific values will be used to sort when @@ -32679,14 +32711,14 @@ declare namespace Excel { * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta * - * @param sortby Represents whether the sorting is done in an ascending or descending order. - * @param valuesHierarchy Specifies the values to be used for sorting. + * @param sortBy Represents whether the sorting is done in an ascending or descending order. + * @param valuesHierarchy Specifies the values hierarchy on the data axis to be used for sorting. * @param pivotItemScope The items that should be used for the scope of the sorting. These will be the items that make up the row or column that you want to sort on. If a string is used instead of a PivotItem, the string represents the ID of the PivotItem. If there are no items other than data hierarchy on the axis you want to sort on, this can be empty. */ - sortByValues(sortby: Excel.SortBy, valuesHierarchy: Excel.DataPivotHierarchy, pivotItemScope?: Array): void; + sortByValues(sortBy: Excel.SortBy, valuesHierarchy: Excel.DataPivotHierarchy, pivotItemScope?: Array): void; /** * * Sorts the PivotField by specified values in a given scope. The scope defines which specific values will be used to sort when @@ -32694,14 +32726,14 @@ declare namespace Excel { * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * - * @param sortby Represents whether the sorting is done in an ascending or descending order. - * @param valuesHierarchy Specifies the values to be used for sorting. + * @param sortBy Represents whether the sorting is done in an ascending or descending order. + * @param valuesHierarchy Specifies the values hierarchy on the data axis to be used for sorting. * @param pivotItemScope The items that should be used for the scope of the sorting. These will be the items that make up the row or column that you want to sort on. If a string is used instead of a PivotItem, the string represents the ID of the PivotItem. If there are no items other than data hierarchy on the axis you want to sort on, this can be empty. */ - sortByValues(sortby: "Ascending" | "Descending", valuesHierarchy: Excel.DataPivotHierarchy, pivotItemScope?: Array): void; + sortByValues(sortBy: "Ascending" | "Descending", valuesHierarchy: Excel.DataPivotHierarchy, pivotItemScope?: Array): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. * @@ -48873,7 +48905,7 @@ declare namespace Excel { interface PivotTableUpdateData { /** * - * True if the PivotTable should use custom lists when sorting. + * Specifies whether the PivotTable allows values in the data body to be edited by the user. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -48888,7 +48920,7 @@ declare namespace Excel { name?: string; /** * - * True if the PivotTable should use custom lists when sorting. + * Specifies whether the PivotTable uses custom lists when sorting. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -48899,7 +48931,7 @@ declare namespace Excel { interface PivotLayoutUpdateData { /** * - * True if formatting will be automatically formatted when it’s refreshed or when fields are moved + * Specifies whether formatting will be automatically formatted when it’s refreshed or when fields are moved * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -48907,7 +48939,7 @@ declare namespace Excel { autoFormat?: boolean; /** * - * True if the field list should be shown or hidden from the UI. + * Specifies whether the field list can be shown in the UI. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -48922,7 +48954,7 @@ declare namespace Excel { layoutType?: Excel.PivotLayoutType | "Compact" | "Tabular" | "Outline"; /** * - * True if formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. + * Specifies whether formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -48930,14 +48962,14 @@ declare namespace Excel { preserveFormatting?: boolean; /** * - * True if the PivotTable report shows grand totals for columns. + * Specifies whether the PivotTable report shows grand totals for columns. * * [Api set: ExcelApi 1.8] */ showColumnGrandTotals?: boolean; /** * - * True if the PivotTable report shows grand totals for rows. + * Specifies whether the PivotTable report shows grand totals for rows. * * [Api set: ExcelApi 1.8] */ @@ -51364,6 +51396,14 @@ declare namespace Excel { * @beta */ hasSpill?: boolean; + /** + * + * Returns the distance in points, for 100% zoom, from top edge of the range to bottom edge of the range. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + height?: number; /** * * Represents if all cells of the current range are hidden. Read-only. @@ -51392,6 +51432,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ isEntireRow?: boolean; + /** + * + * Returns the distance in points, for 100% zoom, from left edge of the worksheet to left edge of the range. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + left?: number; /** * * Represents the data type state of each cell. Read-only. @@ -51453,6 +51501,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ text?: string[][]; + /** + * + * Returns the distance in points, for 100% zoom, from top edge of the worksheet to top edge of the range. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + top?: number; /** * * Represents the type of data of each cell. Read-only. @@ -51468,6 +51524,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ values?: any[][]; + /** + * + * Returns the distance in points, for 100% zoom, from left edge of the range to right edge of the range. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + width?: number; } /** An interface describing the data returned by calling "rangeAreas.toJSON()". */ interface RangeAreasData { @@ -54639,7 +54703,7 @@ declare namespace Excel { rowHierarchies?: Excel.Interfaces.RowColumnPivotHierarchyData[]; /** * - * True if the PivotTable should use custom lists when sorting. + * Specifies whether the PivotTable allows values in the data body to be edited by the user. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -54661,7 +54725,7 @@ declare namespace Excel { name?: string; /** * - * True if the PivotTable should use custom lists when sorting. + * Specifies whether the PivotTable uses custom lists when sorting. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -54672,7 +54736,7 @@ declare namespace Excel { interface PivotLayoutData { /** * - * True if formatting will be automatically formatted when it’s refreshed or when fields are moved + * Specifies whether formatting will be automatically formatted when it’s refreshed or when fields are moved * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -54680,7 +54744,7 @@ declare namespace Excel { autoFormat?: boolean; /** * - * True if the field list should be shown or hidden from the UI. + * Specifies whether the field list can be shown in the UI. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -54695,7 +54759,7 @@ declare namespace Excel { layoutType?: Excel.PivotLayoutType | "Compact" | "Tabular" | "Outline"; /** * - * True if formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. + * Specifies whether formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -54703,14 +54767,14 @@ declare namespace Excel { preserveFormatting?: boolean; /** * - * True if the PivotTable report shows grand totals for columns. + * Specifies whether the PivotTable report shows grand totals for columns. * * [Api set: ExcelApi 1.8] */ showColumnGrandTotals?: boolean; /** * - * True if the PivotTable report shows grand totals for rows. + * Specifies whether the PivotTable report shows grand totals for rows. * * [Api set: ExcelApi 1.8] */ @@ -57633,6 +57697,14 @@ declare namespace Excel { * @beta */ hasSpill?: boolean; + /** + * + * Returns the distance in points, for 100% zoom, from top edge of the range to bottom edge of the range. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + height?: boolean; /** * * Represents if all cells of the current range are hidden. Read-only. @@ -57661,6 +57733,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ isEntireRow?: boolean; + /** + * + * Returns the distance in points, for 100% zoom, from left edge of the worksheet to left edge of the range. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + left?: boolean; /** * * Represents the data type state of each cell. Read-only. @@ -57722,6 +57802,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ text?: boolean; + /** + * + * Returns the distance in points, for 100% zoom, from top edge of the worksheet to top edge of the range. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + top?: boolean; /** * * Represents the type of data of each cell. Read-only. @@ -57737,6 +57825,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ values?: boolean; + /** + * + * Returns the distance in points, for 100% zoom, from left edge of the range to right edge of the range. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + width?: boolean; } /** * @@ -62547,7 +62643,7 @@ declare namespace Excel { worksheet?: Excel.Interfaces.WorksheetLoadOptions; /** * - * For EACH ITEM in the collection: True if the PivotTable should use custom lists when sorting. + * For EACH ITEM in the collection: Specifies whether the PivotTable allows values in the data body to be edited by the user. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -62569,7 +62665,7 @@ declare namespace Excel { name?: boolean; /** * - * For EACH ITEM in the collection: True if the PivotTable should use custom lists when sorting. + * For EACH ITEM in the collection: Specifies whether the PivotTable uses custom lists when sorting. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -62600,7 +62696,7 @@ declare namespace Excel { worksheet?: Excel.Interfaces.WorksheetLoadOptions; /** * - * True if the PivotTable should use custom lists when sorting. + * Specifies whether the PivotTable allows values in the data body to be edited by the user. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -62622,7 +62718,7 @@ declare namespace Excel { name?: boolean; /** * - * True if the PivotTable should use custom lists when sorting. + * Specifies whether the PivotTable uses custom lists when sorting. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -62639,7 +62735,7 @@ declare namespace Excel { $all?: boolean; /** * - * True if formatting will be automatically formatted when it’s refreshed or when fields are moved + * Specifies whether formatting will be automatically formatted when it’s refreshed or when fields are moved * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -62647,7 +62743,7 @@ declare namespace Excel { autoFormat?: boolean; /** * - * True if the field list should be shown or hidden from the UI. + * Specifies whether the field list can be shown in the UI. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -62662,7 +62758,7 @@ declare namespace Excel { layoutType?: boolean; /** * - * True if formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. + * Specifies whether formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -62670,14 +62766,14 @@ declare namespace Excel { preserveFormatting?: boolean; /** * - * True if the PivotTable report shows grand totals for columns. + * Specifies whether the PivotTable report shows grand totals for columns. * * [Api set: ExcelApi 1.8] */ showColumnGrandTotals?: boolean; /** * - * True if the PivotTable report shows grand totals for rows. + * Specifies whether the PivotTable report shows grand totals for rows. * * [Api set: ExcelApi 1.8] */ @@ -65085,6 +65181,14 @@ declare namespace Excel { * @beta */ hasSpill?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the distance in points, for 100% zoom, from top edge of the range to bottom edge of the range. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + height?: boolean; /** * * For EACH ITEM in the collection: Represents if all cells of the current range are hidden. Read-only. @@ -65113,6 +65217,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ isEntireRow?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the distance in points, for 100% zoom, from left edge of the worksheet to left edge of the range. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + left?: boolean; /** * * For EACH ITEM in the collection: Represents the data type state of each cell. Read-only. @@ -65174,6 +65286,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ text?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the distance in points, for 100% zoom, from top edge of the worksheet to top edge of the range. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + top?: boolean; /** * * For EACH ITEM in the collection: Represents the type of data of each cell. Read-only. @@ -65189,6 +65309,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ values?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the distance in points, for 100% zoom, from left edge of the range to right edge of the range. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + width?: boolean; } /** *