편집

다음을 통해 공유


What's new in Excel JavaScript API 1.13

The ExcelApi 1.13 added a method to insert worksheets into a workbook from a Base64-encoded string and an event to detect workbook activation. It also increased support for formulas in ranges by adding APIs to track changes to formulas and locate a formula's direct dependent cells. Additionally, it expanded PivotTable support by adding PivotLayout APIs for alt text, style, and empty cell management.

Feature area Description Relevant objects
Formula changed events Track changes to formulas, including the source and type of event that caused a change. Worksheet.onFormulaChanged
Formula dependents Locate the direct dependent cells of a formula. Range.getDirectDependents
Insert worksheets Insert worksheets from another workbook into the current workbook as a Base64-encoded string. Workbook.insertWorksheetsFromBase64
PivotTable PivotLayout An expansion of the PivotLayout class, including new support for alt text and empty cell management. PivotLayout

API list

The following table lists the APIs in Excel JavaScript API requirement set 1.13. To view API reference documentation for all APIs supported by Excel JavaScript API requirement set 1.13 or earlier, see Excel APIs in requirement set 1.13 or earlier.

Class Fields Description
FormulaChangedEventDetail cellAddress The address of the cell that contains the changed formula.
previousFormula Represents the previous formula, before it was changed.
InsertWorksheetOptions positionType The insert position, in the current workbook, of the new worksheets.
relativeTo The worksheet in the current workbook that is referenced for the WorksheetPositionType parameter.
sheetNamesToInsert The names of individual worksheets to insert.
PivotLayout altTextDescription The alt text description of the PivotTable.
altTextTitle The alt text title of the PivotTable.
displayBlankLineAfterEachItem(display: boolean) Sets whether or not to display a blank line after each item.
emptyCellText The text that is automatically filled into any empty cell in the PivotTable if fillEmptyCells == true.
fillEmptyCells Specifies whether empty cells in the PivotTable should be populated with the emptyCellText.
repeatAllItemLabels(repeatLabels: boolean) Sets the "repeat all item labels" setting across all fields in the PivotTable.
showFieldHeaders Specifies whether the PivotTable displays field headers (field captions and filter drop-downs).
PivotTable refreshOnOpen Specifies whether the PivotTable refreshes when the workbook opens.
Range getDirectDependents() Returns a WorkbookRangeAreas object that represents the range containing all the direct dependent cells of a specified range in the same worksheet or across multiple worksheets.
getExtendedRange(direction: Excel.KeyboardDirection, activeCell?: Range | string) Returns a range object that includes the current range and up to the edge of the range, based on the provided direction.
getMergedAreasOrNullObject() Returns a RangeAreas object that represents the merged areas in this range.
getRangeEdge(direction: Excel.KeyboardDirection, activeCell?: Range | string) Returns a range object that is the edge cell of the data region that corresponds to the provided direction.
Table resize(newRange: Range | string) Resize the table to the new range.
Workbook insertWorksheetsFromBase64(base64File: string, options?: Excel.InsertWorksheetOptions) Inserts the specified worksheets from a source workbook into the current workbook.
onActivated Occurs when the workbook is activated.
WorkbookActivatedEventArgs type Gets the type of the event.
Worksheet onFormulaChanged Occurs when one or more formulas are changed in this worksheet.
WorksheetCollection onFormulaChanged Occurs when one or more formulas are changed in any worksheet of this collection.
WorksheetFormulaChangedEventArgs formulaDetails Gets an array of FormulaChangedEventDetail objects, which contain the details about the all of the changed formulas.
source The source of the event.
type Gets the type of the event.
worksheetId Gets the ID of the worksheet in which the formula changed.

See also