Excel JavaScript API requirement sets

Requirement sets are named groups of API members. Office Add-ins use requirement sets specified in the manifest or use a runtime check to determine whether an Office host supports APIs that an add-in needs. For more information, see Office versions and requirement sets.

Excel add-ins run across multiple versions of Office, including Office 2016 or later on Windows, and Office on the web, Mac, and iPad. The following table lists the Excel requirement sets, the Office host applications that support each requirement set, and the build versions or number for those applications.

Note

To use APIs in any of the numbered requirement sets, you should reference the production library on the CDN: https://appsforoffice.microsoft.com/lib/1/hosted/office.js.

For information about using preview APIs, see the Excel JavaScript preview APIs section within this article.

Requirement set Office on Windows
(connected to Office 365 subscription)
Office on iPad
(connected to Office 365 subscription)
Office on Mac
(connected to Office 365 subscription)
Office on the web Office Online Server
Preview Please use the latest Office version to try preview APIs (you may need to join the Office Insider program)
ExcelApi 1.9 Version 1903 (Build 11425.20204) or later 2.24 or later 16.24 or later May 2019 N/A
ExcelApi 1.8 Version 1808 (Build 10730.20102) or later 2.17 or later 16.17 or later September 2018 N/A
ExcelApi 1.7 Version 1801 (Build 9001.2171) or later 2.9 or later 16.9 or later April 2018 N/A
ExcelApi 1.6 Version 1704 (Build 8201.2001) or later 2.2 or later 15.36 or later April 2017 N/A
ExcelApi 1.5 Version 1703 (Build 8067.2070) or later 2.2 or later 15.36 or later March 2017 N/A
ExcelApi 1.4 Version 1701 (Build 7870.2024) or later 2.2 or later 15.36 or later January 2017 N/A
ExcelApi 1.3 Version 1608 (Build 7369.2055) or later 1.27 or later 15.27 or later September 2016 Version 1608 (Build 7601.6800) or later
ExcelApi 1.2 Version 1601 (Build 6741.2088) or later 1.21 or later 15.22 or later January 2016 N/A
ExcelApi 1.1 Version 1509 (Build 4266.1001) or later 1.19 or later 15.20 or later January 2016 N/A

Note

The build number for Office 2016 installed via MSI is 16.0.4266.1001. This version only contains the ExcelApi 1.1 requirement set.

Custom Functions

Custom Functions use separate requirement sets from the core Excel JavaScript APIs. The following table lists the Custom Functions requirement sets, the supported Office host applications, and the build versions or number for those applications.

Requirement set Office on Windows
(connected to Office 365 subscription)
Office on iPad
(connected to Office 365 subscription)
Office on Mac
(connected to Office 365 subscription)
Office on the web Office Online Server
CustomFunctionsRuntime 1.1 Version 1904 (Build 11601.20144) or later Not supported 16.24 or later April 2019 N/A

For more information about versions, build numbers, and Office Online Server, see:

Excel JavaScript preview APIs

New Excel JavaScript APIs are first introduced in "preview" and later become part of a specific, numbered requirement set after sufficient testing occurs and user feedback is acquired.

The first table provides a concise summary of the APIs, while the subsequent table gives a detailed list.

Note

Preview APIs are subject to change and are not intended for use in a production environment. We recommend that you try them out in test and development environments only. Do not use preview APIs in a production environment or within business-critical documents.

To use preview APIs, you must reference the beta library on the CDN (https://appsforoffice.microsoft.com/lib/beta/hosted/office.js) and you may also need to join the Office Insider program to get a recent Office build.

Feature area Description Relevant objects
Slicer Insert and configure slicers to tables and PivotTables. Slicer
Comments Add, edit, and delete comments. Comment, CommentCollection
Workbook Save and Close Save and close workbooks. Workbook
Insert Workbook Insert one workbook into another. Workbook

The following is a complete list of APIs currently in preview.

Class Fields Description
Comment content Gets or sets the comment's content.
delete() Deletes the comment thread.
getLocation() Gets the cell where this comment is located.
authorEmail Gets the email of the comment's author.
authorName Gets the name of the comment's author.
creationDate Gets the creation time of the comment. Returns null if the comment was converted from a note, since the comment does not have a creation date.
id Represents the comment identifier. Read-only.
replies Represents a collection of reply objects associated with the comment. Read-only.
CommentCollection add(content: string, cellAddress: Range | string, contentType?: Excel.ContentType) Creates a new comment with the given content on the given cell. An InvalidArgument error is thrown if the provided range is larger than one cell.
getCount() Gets the number of comments in the collection.
getItem(commentId: string) Gets a comment from the collection based on its ID. Read-only.
getItemAt(index: number) Gets a comment from the collection based on its position.
getItemByCell(cellAddress: Range | string) Gets the comment from the specified cell.
getItemByReplyId(replyId: string) Gets a comment from the collection with the corresponding reply ID.
items Gets the loaded child items in this collection.
CommentReply content Gets or sets the comment's content.
delete() Deletes the comment reply.
getLocation() Gets the cell where this comment reply is located.
getParentComment() Gets the parent comment of this reply.
authorEmail Gets the email of the comment reply's author.
authorName Gets the name of the comment reply's author.
creationDate Gets the creation time of the comment reply.
id Represents the comment reply identifier. Read-only.
CommentReplyCollection add(content: string, contentType?: Excel.ContentType) Creates a comment reply for comment.
getCount() Gets the number of comment replies in the collection.
getItem(commentReplyId: string) Returns a comment reply identified by its ID. Read-only.
getItemAt(index: number) Gets a comment reply based on its position in the collection.
items Gets the loaded child items in this collection.
CustomFunctionEventArgs higherTicks
lowerTicks
PivotLayout enableFieldList Specifies whether the field list can be shown in the UI.
getCell(dataHierarchy: DataPivotHierarchy | string, rowItems: Array<PivotItem | string>, columnItems: Array<PivotItem | string>) 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.
PivotTableStyle delete() Deletes the PivotTableStyle.
duplicate() Creates a duplicate of this PivotTableStyle with copies of all the style elements.
name Gets the name of the PivotTableStyle.
readOnly Specifies if this PivotTableStyle object is read-only. Read-only.
PivotTableStyleCollection add(name: string, makeUniqueName?: boolean) Creates a blank PivotTableStyle with the specified name.
getCount() Gets the number of PivotTable styles in the collection.
getDefault() Gets the default PivotTableStyle for the parent object's scope.
getItem(name: string) Gets a PivotTableStyle by name.
getItemOrNullObject(name: string) Gets a PivotTableStyle by name. If the PivotTableStyle does not exist, will return a null object.
items Gets the loaded child items in this collection.
setDefault(newDefaultStyle: PivotTableStyle | string) Sets the default PivotTableStyle for use in the parent object's scope.
Range getSpillParent() Gets the range object containing the anchor cell for a cell getting spilled into. Fails if applied to a range with more than one cell. Read-only.
getSpillParentOrNullObject() Gets the range object containing the anchor cell for a cell getting spilled into. Read-only.
getSpillingToRange() Gets the range object containing the spill range when called on an anchor cell. Fails if applied to a range with more than one cell. Read-only.
getSpillingToRangeOrNullObject() Gets the range object containing the spill range when called on an anchor cell. Read-only.
hasSpill Represents if all cells have a spill border.
height Returns the distance in points, for 100% zoom, from top edge of the range to bottom edge of the range. Read-only.
left Returns the distance in points, for 100% zoom, from left edge of the worksheet to left edge of the range. Read-only.
top Returns the distance in points, for 100% zoom, from top edge of the worksheet to top edge of the range. Read-only.
width Returns the distance in points, for 100% zoom, from left edge of the range to right edge of the range. Read-only.
Shape copyTo(destinationSheet?: Worksheet | string) Copies and pastes a Shape object.
placement Represents how the object is attached to the cells below it.
ShapeCollection addSvg(xml: string) Creates a scalable vector graphic (SVG) from an XML string and adds it to the worksheet. Returns a Shape object that represents the new image.
Slicer caption Represents the caption of slicer.
clearFilters() Clears all the filters currently applied on the slicer.
delete() Deletes the slicer.
getSelectedItems() Returns an array of selected items' keys. Read-only.
height Represents the height, in points, of the slicer.
left Represents the distance, in points, from the left side of the slicer to the left of the worksheet.
name Represents the name of slicer.
nameInFormula Represents the slicer name used in the formula.
id Represents the unique id of slicer. Read-only.
isFilterCleared True if all filters currently applied on the slicer are cleared.
slicerItems Represents the collection of SlicerItems that are part of the slicer. Read-only.
worksheet Represents the worksheet containing the slicer. Read-only.
selectItems(items?: string[]) Select slicer items based on their keys. Previous selection will be cleared.
sortBy Represents the sort order of the items in the slicer. Possible values are: DataSourceOrder, Ascending, Descending.
style Constant value that represents the Slicer style. Possible values are: SlicerStyleLight1 through SlicerStyleLight6, TableStyleOther1 through TableStyleOther2, SlicerStyleDark1 through SlicerStyleDark6. A custom user-defined style present in the workbook can also be specified.
top Represents the distance, in points, from the top edge of the slicer to the top of the worksheet.
width Represents the width, in points, of the slicer.
SlicerCollection add(slicerSource: string | PivotTable | Table, sourceField: string | PivotField | number | TableColumn, slicerDestination?: string | Worksheet) Adds a new slicer to the workbook.
getCount() Returns the number of slicers in the collection.
getItem(key: string) Gets a slicer object using its name or id.
getItemAt(index: number) Gets a slicer based on its position in the collection.
getItemOrNullObject(key: string) Gets a slicer using its name or id. If the slicer does not exist, will return a null object.
items Gets the loaded child items in this collection.
SlicerItem isSelected True if the slicer item is selected.
hasData True if the slicer item has data.
key Represents the unique value representing the slicer item.
name Represents the value displayed in the UI.
SlicerItemCollection getCount() Returns the number of slicer items in the slicer.
getItem(key: string) Gets a slicer item object using its key or name.
getItemAt(index: number) Gets a slicer item based on its position in the collection.
getItemOrNullObject(key: string) Gets a slicer item using its key or name. If the slicer item does not exist, will return a null object.
items Gets the loaded child items in this collection.
SlicerStyle delete() Deletes the SlicerStyle.
duplicate() Creates a duplicate of this SlicerStyle with copies of all the style elements.
name Gets the name of the SlicerStyle.
readOnly Specifies if this SlicerStyle object is read-only. Read-only.
SlicerStyleCollection add(name: string, makeUniqueName?: boolean) Creates a blank SlicerStyle with the specified name.
getCount() Gets the number of slicer styles in the collection.
getDefault() Gets the default SlicerStyle for the parent object's scope.
getItem(name: string) Gets a SlicerStyle by name.
getItemOrNullObject(name: string) Gets a SlicerStyle by name. If the SlicerStyle does not exist, will return a null object.
items Gets the loaded child items in this collection.
setDefault(newDefaultStyle: SlicerStyle | string) Sets the default SlicerStyle for use in the parent object's scope.
Table clearStyle() Changes the table to use the default table style.
onFiltered Occurs when filter is applied on a specific table.
TableCollection onFiltered Occurs when filter is applied on any table in a workbook or worksheet.
TableFilteredEventArgs tableId Represents the id of the table in which the filter is applied..
type Represents the type of the event. See Excel.EventType for details.
worksheetId Represents the id of the worksheet which contains the table.
TableStyle delete() Deletes the TableStyle.
duplicate() Creates a duplicate of this TableStyle with copies of all the style elements.
name Gets the name of the TableStyle.
readOnly Specifies if this TableStyle object is read-only. Read-only.
TableStyleCollection add(name: string, makeUniqueName?: boolean) Creates a blank TableStyle with the specified name.
getCount() Gets the number of table styles in the collection.
getDefault() Gets the default TableStyle for the parent object's scope.
getItem(name: string) Gets a TableStyle by name.
getItemOrNullObject(name: string) Gets a TableStyle by name. If the TableStyle does not exist, will return a null object.
items Gets the loaded child items in this collection.
setDefault(newDefaultStyle: TableStyle | string) Sets the default TableStyle for use in the parent object's scope.
TimelineStyle delete() Deletes the TableStyle.
duplicate() Creates a duplicate of this TimelineStyle with copies of all the style elements.
name Gets the name of the TimelineStyle.
readOnly Specifies if this TimelineStyle object is read-only. Read-only.
TimelineStyleCollection add(name: string, makeUniqueName?: boolean) Creates a blank TimelineStyle with the specified name.
getCount() Gets the number of timeline styles in the collection.
getDefault() Gets the default TimelineStyle for the parent object's scope.
getItem(name: string) Gets a TimelineStyle by name.
getItemOrNullObject(name: string) Gets a TimelineStyle by name. If the TimelineStyle does not exist, will return a null object.
items Gets the loaded child items in this collection.
setDefault(newDefaultStyle: TimelineStyle | string) Sets the default TimelineStyle for use in the parent object's scope.
Workbook close(closeBehavior?: Excel.CloseBehavior) Close current workbook.
getActiveSlicer() Gets the currently active slicer in the workbook. If there is no active slicer, an exception is thrown.
getActiveSlicerOrNullObject() Gets the currently active slicer in the workbook. If there is no active slicer, a null object is returned.
comments Represents a collection of Comments associated with the workbook. Read-only.
pivotTableStyles Represents a collection of PivotTableStyles associated with the workbook. Read-only.
slicerStyles Represents a collection of SlicerStyles associated with the workbook. Read-only.
slicers Represents a collection of Slicers associated with the workbook. Read-only.
tableStyles Represents a collection of TableStyles associated with the workbook. Read-only.
timelineStyles Represents a collection of TimelineStyles associated with the workbook. Read-only.
save(saveBehavior?: Excel.SaveBehavior) Save current workbook.
use1904DateSystem True if the workbook uses the 1904 date system.
Worksheet comments Returns a collection of all the Comments objects on the worksheet. Read-only.
onColumnSorted Occurs when sorting on columns.
onFiltered Occurs when filter is applied on a specific worksheet.
onRowSorted Occurs when sorting on rows.
onSingleClicked Occurs when left-clicked/tapped operation happens in the worksheet.
slicers Returns collection of slicers that are part of the worksheet. Read-only.
WorksheetCollection addFromBase64(base64File: string, sheetNamesToInsert?: string[], positionType?: Excel.WorksheetPositionType, relativeTo?: Worksheet | string) Inserts the specified worksheets of a workbook into the current workbook.
onColumnSorted Occurs when sorting on columns.
onFiltered Occurs when any worksheet's filter is applied in the workbook.
onRowSorted Occurs when sorting on rows.
WorksheetColumnSortedEventArgs address Gets the range address that represents the sorted areas of a specific worksheet.
source Gets the source of the event. See Excel.EventSource for details.
type Gets the type of the event. See Excel.EventType for details.
worksheetId Gets the id of the worksheet where the sorting happened.
WorksheetFilteredEventArgs type Represents the type of the event. See Excel.EventType for details.
worksheetId Represents the id of the worksheet in which the filter is applied.
WorksheetRowSortedEventArgs address Gets the range address that represents the sorted areas of a specific worksheet.
source Gets the source of the event. See Excel.EventSource for details.
type Gets the type of the event. See Excel.EventType for details.
worksheetId Gets the id of the worksheet where the sorting happened.
WorksheetSingleClickedEventArgs address Gets the address that represents the cell which was left-clicked/tapped for a specific worksheet.
offsetX The distance, in points, from the left-clicked/tapped point to the left (right for RTL) gridline edge of the left-clicked/tapped cell.
offsetY The distance, in points, from the left-clicked/tapped point to the top gridline edge of the left-clicked/tapped cell.
type Gets the type of the event.
worksheetId Gets the id of the worksheet in which the cell was left-clicked/tapped.

What’s new in Excel JavaScript API 1.9

More than 500 new Excel APIs were introduced with the 1.9 requirement set. The first table provides a concise summary of the APIs, while the subsequent table gives a detailed list.

Feature area Description Relevant objects
Shapes Insert, position, and format images, geometric shapes and text boxes. ShapeCollection Shape GeometricShape Image
Auto Filter Add filters to ranges. AutoFilter
Areas Support for discontinuous ranges. RangeAreas
Special Cells Get cells containing dates, comments, or formulas within a range. Range
Find Find values or formulas within a range or worksheet. RangeWorksheet
Copy and Paste Copy values, formats, and formulas from one range to another. Range
Calculation Greater control over the Excel calculation engine. Application
New Charts Explore our new supported chart types: maps, box and whisker, waterfall, sunburst, pareto. and funnel. Chart
RangeFormat New capabilities with range formats. Range

The following is a complete list of APIs in the ExcelApi 1.9 requirement set.

Class Fields Description
Application calculationEngineVersion Returns the Excel calculation engine version used for the last full recalculation. Read-only.
calculationState Returns the calculation state of the application. See Excel.CalculationState for details. Read-only.
iterativeCalculation Returns the Iterative Calculation settings.
suspendScreenUpdatingUntilNextSync() Suspends sceen updating until the next "context.sync()" is called.
AutoFilter apply(range: Range | string, columnIndex?: number, criteria?: Excel.FilterCriteria) Applies the AutoFilter to a range. This filters the column if column index and filter criteria are specified.
clearCriteria() Clears the filter criteria of the AutoFilter.
getRange() Returns the Range object that represents the range to which the AutoFilter applies.
getRangeOrNullObject() Returns the Range object that represents the range to which the AutoFilter applies.
load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
criteria An array that holds all the filter criteria in the autofiltered range. Read-Only.
enabled Indicates if the AutoFilter is enabled or not. Read-Only.
isDataFiltered Indicates if the AutoFilter has filter criteria. Read-Only.
reapply() Applies the specified Autofilter object currently on the range.
remove() Removes the AutoFilter for the range.
CellBorder color Represents the color property of a single border.
style Represents the style property of a single border.
tintAndShade Represents the tintAndShade property of a single border.
weight Represents the weight property of a single border.
CellBorderCollection bottom Represents the format.borders.bottom property.
diagonalDown Represents the format.borders.diagonalDown property.
diagonalUp Represents the format.borders.diagonalUp property.
horizontal Represents the format.borders.horizontal property.
left Represents the format.borders.left property.
right Represents the format.borders.right property.
top Represents the format.borders.top property.
vertical Represents the format.borders.vertical property.
CellProperties address Represents the address property.
addressLocal Represents the addressLocal property.
hidden Represents the hidden property.
CellPropertiesFill color Represents the format.fill.color property.
pattern Represents the format.fill.pattern property.
patternColor Represents the format.fill.patternColor property.
patternTintAndShade Represents the format.fill.patternTintAndShade property.
tintAndShade Represents the format.fill.tintAndShade property.
CellPropertiesFont bold Represents the format.font.bold property.
color Represents the format.font.color property.
italic Represents the format.font.italic property.
name Represents the format.font.name property.
size Represents the format.font.size property.
strikethrough Represents the format.font.strikethrough property.
subscript Represents the format.font.subscript property.
superscript Represents the format.font.superscript property.
tintAndShade Represents the format.font.tintAndShade property.
underline Represents the format.font.underline property.
CellPropertiesFormat autoIndent Represents the autoIndent property.
borders Represents the borders property.
fill Represents the fill property.
font Represents the font property.
horizontalAlignment Represents the horizontalAlignment property.
indentLevel Represents the indentLevel property.
protection Represents the protection property.
readingOrder Represents the readingOrder property.
shrinkToFit Represents the shrinkToFit property.
textOrientation Represents the textOrientation property.
useStandardHeight Represents the useStandardHeight property.
useStandardWidth Represents the useStandardWidth property.
verticalAlignment Represents the verticalAlignment property.
wrapText Represents the wrapText property.
CellPropertiesProtection formulaHidden Represents the format.protection.formulaHidden property.
locked Represents the format.protection.locked property.
ChangedEventDetail valueAfter Represents the value after changed. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string.
valueBefore Represents the value before changed. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string.
valueTypeAfter Represents the type of value after changed
valueTypeBefore Represents the type of value before changed
Chart activate() Activates the chart in the Excel UI.
pivotOptions Encapsulates the options for a pivot chart. Read-only.
ChartAreaFormat colorScheme Returns or sets color scheme of the chart. Read/Write.
roundedCorners Specifies whether or not chart area of the chart has rounded corners. Read/Write.
ChartAxis linkNumberFormat Represents whether or not the number format is linked to the cells. If true, the number format will change in the labels when it changes in the cells.
ChartBinOptions allowOverflow Specifies whether or not the bin overflow is enabled in a histogram chart or pareto chart. Read/Write.
allowUnderflow Specifies whether or not the bin underflow is enabled in a histogram chart or pareto chart. Read/Write.
count Returns or sets the bin count of a histogram chart or pareto chart. Read/Write.
load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
overflowValue Returns or sets the bin overflow value of a histogram chart or pareto chart. Read/Write.
type Returns or sets the bin's type for a histogram chart or pareto chart. Read/Write.
underflowValue Returns or sets the bin underflow value of a histogram chart or pareto chart. Read/Write.
width Returns or sets the bin width value of a histogram chart or pareto chart. Read/Write.
ChartBoxwhiskerOptions load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
quartileCalculation Returns or sets the quartile calculation type of a box and whisker chart. Read/Write.
showInnerPoints Specifies whether or not the inner points are shown in a box and whisker chart. Read/Write.
showMeanLine Specifies whether or not the mean line is shown in a box and whisker chart. Read/Write.
showMeanMarker Specifies whether or not the mean marker is shown in a box and whisker chart. Read/Write.
showOutlierPoints Specifies whether or not outlier points are shown in a box and whisker chart. Read/Write.
ChartDataLabel linkNumberFormat Boolean value representing if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells).
ChartDataLabels linkNumberFormat Represents whether or not the number format is linked to the cells. If true, the number format will change in the labels when it changes in the cells
ChartErrorBars endStyleCap Specifies whether or not the error bars have an end style cap.
include Specifies which parts of the error bars to include.
load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
format Specifies the formatting type of the error bars.
type The type of range marked by the error bars.
visible Specifies whether or not the error bars are displayed.
ChartErrorBarsFormat load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
line Represents the chart line formatting.
ChartMapOptions labelStrategy Returns or sets the series map labels strategy of a region map chart. Read/Write.
level Returns or sets the series mapping level of a region map chart. Read/Write.
load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
projectionType Returns or sets the series projection type of a region map chart. Read/Write.
ChartPivotOptions load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
showAxisFieldButtons Specifies whether or not to display the axis field buttons on a PivotChart. The ShowAxisFieldButtons property corresponds to the "Show Axis Field Buttons" command on the "Field Buttons" drop-down list of the "Analyze" tab, which is available when a PivotChart is selected.
showLegendFieldButtons Specifies whether or not to display the legend field buttons on a PivotChart
showReportFilterFieldButtons Specifies whether or not to display the report filter field buttons on a PivotChart.
showValueFieldButtons Specifies whether or not to display the show value field buttons on a PivotChart
ChartSeries bubbleScale This can be an integer value from 0 (zero) to 300, representing the percentage of the default size. This property only applies to bubble charts. Read/Write.
gradientMaximumColor Returns or sets the color for maximum value of a region map chart series. Read/Write.
gradientMaximumType Returns or sets the type for maximum value of a region map chart series. Read/Write.
gradientMaximumValue Returns or sets the maximum value of a region map chart series. Read/Write.
gradientMidpointColor Returns or sets the color for midpoint value of a region map chart series. Read/Write.
gradientMidpointType Returns or sets the type for midpoint value of a region map chart series. Read/Write.
gradientMidpointValue Returns or sets the midpoint value of a region map chart series. Read/Write.
gradientMinimumColor Returns or sets the color for minimum value of a region map chart series. Read/Write.
gradientMinimumType Returns or sets the type for minimum value of a region map chart series. Read/Write.
gradientMinimumValue Returns or sets the minimum value of a region map chart series. Read/Write.
gradientStyle Returns or sets series gradient style of a region map chart. Read/Write.
invertColor Returns or sets the fill color for negative data points in a series. Read/Write.
parentLabelStrategy Returns or sets the series parent label strategy area for a treemap chart. Read/Write.
binOptions Encapsulates the bin options for histogram charts and pareto charts. Read-only.
boxwhiskerOptions Encapsulates the options for the box and whisker charts. Read-only.
mapOptions Encapsulates the options for a region map chart. Read-only.
xErrorBars Represents the error bar object of a chart series.
yErrorBars Represents the error bar object of a chart series.
showConnectorLines Specifies whether or not connector lines are shown in waterfall charts. Read/Write.
showLeaderLines Specifies whether or not leader lines are displayed for each data label in the series. Read/Write.
splitValue Returns or sets the threshold value that separates two sections of either a pie-of-pie chart or a bar-of-pie chart. Read/Write.
ChartTrendlineLabel linkNumberFormat Boolean value representing if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells).
ColumnProperties address Represents the address property.
addressLocal Represents the addressLocal property.
columnIndex Represents the columnIndex property.
ConditionalFormat getRanges() Returns the RangeAreas, comprising one or more rectangular ranges, the conditonal format is applied to. Read-only.
DataValidation getInvalidCells() Returns a RangeAreas, comprising one or more rectangular ranges, with invalid cell values. If all cell values are valid, this function will throw an ItemNotFound error.
getInvalidCellsOrNullObject() Returns a RangeAreas, comprising one or more rectangular ranges, with invalid cell values. If all cell values are valid, this function will return null.
FilterCriteria subField The property used by the filter to do rich filter on richvalues.
GeometricShape load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
id Returns the shape identifier. Read-only.
shape Returns the Shape object for the geometric shape. Read-only.
GroupShapeCollection getCount() Returns the number of shapes in the shape group. Read-only.
getItem(key: string) Gets a shape using its Name or ID.
getItemAt(index: number) Gets a shape based on its position in the collection.
load(option?: OfficeExtension.LoadOption)
load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
items Gets the loaded child items in this collection.
HeaderFooter centerFooter Gets or sets the center footer of the worksheet.
centerHeader Gets or sets the center header of the worksheet.
leftFooter Gets or sets the left footer of the worksheet.
leftHeader Gets or sets the left header of the worksheet.
load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
rightFooter Gets or sets the right footer of the worksheet.
rightHeader Gets or sets the right header of the worksheet.
HeaderFooterGroup load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
defaultForAllPages The general header/footer, used for all pages unless even/odd or first page is specified.
evenPages The header/footer to use for even pages, odd header/footer needs to be specified for odd pages.
firstPage The first page header/footer, for all other pages general or even/odd is used.
oddPages The header/footer to use for odd pages, even header/footer needs to be specified for even pages.
state Gets or sets the state of which headers/footers are set. See Excel.HeaderFooterState for details.
useSheetMargins Gets or sets a flag indicating if headers/footers are aligned with the page margins set in the page layout options for the worksheet.
useSheetScale Gets or sets a flag indicating if headers/footers should be scaled by the page percentage scale set in the page layout options for the worksheet.
Image load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
format Returns the format of the image. Read-only.
id Represents the shape identifier for the image object. Read-only.
shape Returns the Shape object associated with the image. Read-only.
IterativeCalculation enabled True if Excel will use iteration to resolve circular references.
load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
maxChange Returns or sets the maximum amount of change between each iteration as Excel resolves circular references.
maxIteration Returns or sets the maximum number of iterations that Excel can use to resolve a circular reference.
Line beginArrowheadLength Represents the length of the arrowhead at the beginning of the specified line.
beginArrowheadStyle Represents the style of the arrowhead at the beginning of the specified line.
beginArrowheadWidth Represents the width of the arrowhead at the beginning of the specified line.
connectBeginShape(shape: Excel.Shape, connectionSite: number) Attaches the beginning of the specified connector to a specified shape.
connectEndShape(shape: Excel.Shape, connectionSite: number) Attaches the end of the specified connector to a specified shape.
connectorType Represents the connector type for the line.
disconnectBeginShape() Detaches the beginning of the specified connector from a shape.
disconnectEndShape() Detaches the end of the specified connector from a shape.
endArrowheadLength Represents the length of the arrowhead at the end of the specified line.
endArrowheadStyle Represents the style of the arrowhead at the end of the specified line.
endArrowheadWidth Represents the width of the arrowhead at the end of the specified line.
load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
beginConnectedShape Represents the shape to which the beginning of the specified line is attached. Read-only.
beginConnectedSite Represents the connection site to which the beginning of a connector is connected. Read-only. Returns null when the beginning of the line is not attached to any shape.
endConnectedShape Represents the shape to which the end of the specified line is attached. Read-only.
endConnectedSite Represents the connection site to which the end of a connector is connected. Read-only. Returns null when the end of the line is not attached to any shape.
id Represents the shape identifier. Read-only.
isBeginConnected Specifies whether or not the beginning of the specified line is connected to a shape. Read-only.
isEndConnected Specifies whether or not the end of the specified line is connected to a shape. Read-only.
shape Returns the Shape object associated with the line. Read-only.
PageBreak delete() Deletes a page break object.
getCellAfterBreak() Gets the first cell after the page break.
load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
columnIndex Represents the column index for the page break
rowIndex Represents the row index for the page break
PageBreakCollection add(pageBreakRange: Range | string) Adds a page break before the top-left cell of the range specified.
getCount() Gets the number of page breaks in the collection.
getItem(index: number) Gets a page break object via the index.
load(option?: OfficeExtension.LoadOption)
load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
items Gets the loaded child items in this collection.
removePageBreaks() Resets all manual page breaks in the collection.
PageLayout blackAndWhite Gets or sets the worksheet's black and white print option.
bottomMargin Gets or sets the worksheet's bottom page margin to use for printing in points.
centerHorizontally Gets or sets the worksheet's center horizontally flag. This flag determines whether the worksheet will be centered horizontally when it's printed.
centerVertically Gets or sets the worksheet's center vertically flag. This flag determines whether the worksheet will be centered vertically when it's printed.
draftMode Gets or sets the worksheet's draft mode option. If true the sheet will be printed without graphics.
firstPageNumber Gets or sets the worksheet's first page number to print. Null value represents "auto" page numbering.
footerMargin Gets or sets the worksheet's footer margin, in points, for use when printing.
getPrintArea() Gets the RangeAreas object, comprising one or more rectangular ranges, that represents the print area for the worksheet. If there is no print area, an ItemNotFound error will be thrown.
getPrintAreaOrNullObject() Gets the RangeAreas object, comprising one or more rectangular ranges, that represents the print area for the worksheet. If there is no print area, a null object will be returned.
getPrintTitleColumns() Gets the range object representing the title columns.
getPrintTitleColumnsOrNullObject() Gets the range object representing the title columns. If not set, this will return a null object.
getPrintTitleRows() Gets the range object representing the title rows.
getPrintTitleRowsOrNullObject() Gets the range object representing the title rows. If not set, this will return a null object.
headerMargin Gets or sets the worksheet's header margin, in points, for use when printing.
leftMargin Gets or sets the worksheet's left margin, in points, for use when printing.
load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
orientation Gets or sets the worksheet's orientation of the page.
paperSize Gets or sets the worksheet's paper size of the page.
printComments Gets or sets whether the worksheet's comments should be displayed when printing.
printErrors Gets or sets the worksheet's print errors option.
printGridlines Gets or sets the worksheet's print gridlines flag. This flag determines whether gridlines will be printed or not.
printHeadings Gets or sets the worksheet's print headings flag. This flag determines whether headings will be printed or not.
printOrder Gets or sets the worksheet's page print order option. This specifies the order to use for processing the page number printed.
headersFooters Header and footer configuration for the worksheet.
rightMargin Gets or sets the worksheet's right margin, in points, for use when printing.
setPrintArea(printArea: Range | RangeAreas | string) Sets the worksheet's print area.
setPrintMargins(unit: Excel.PrintMarginUnit, marginOptions: Excel.PageLayoutMarginOptions) Sets the worksheet's page margins with units.
setPrintMargins(unitString: "Points" | "Inches" | "Centimeters", marginOptions: Excel.PageLayoutMarginOptions) Sets the worksheet's page margins with units.
setPrintTitleColumns(printTitleColumns: Range | string) Sets the columns that contain the cells to be repeated at the left of each page of the worksheet for printing.
setPrintTitleRows(printTitleRows: Range | string) Sets the rows that contain the cells to be repeated at the top of each page of the worksheet for printing.
topMargin Gets or sets the worksheet's top margin, in points, for use when printing.
zoom Gets or sets the worksheet's print zoom options.
PageLayoutMarginOptions bottom Represents the page layout bottom margin in the unit specified to use for printing.
footer Represents the page layout footer margin in the unit specified to use for printing.
header Represents the page layout header margin in the unit specified to use for printing.
left Represents the page layout left margin in the unit specified to use for printing.
right Represents the page layout right margin in the unit specified to use for printing.
top Represents the page layout top margin in the unit specified to use for printing.
PageLayoutZoomOptions horizontalFitToPages Number of pages to fit horizontally. This value can be null if percentage scale is used.
scale Print page scale value can be between 10 and 400. This value can be null if fit to page tall or wide is specified.
verticalFitToPages Number of pages to fit vertically. This value can be null if percentage scale is used.
PivotField sortByValues(sortBy: Excel.SortBy, valuesHierarchy: Excel.DataPivotHierarchy, pivotItemScope?: Array<PivotItem | string>) Sorts the PivotField by specified values in a given scope. The scope defines which specific values will be used to sort when
sortByValues(sortByString: "Ascending" | "Descending", valuesHierarchy: Excel.DataPivotHierarchy, pivotItemScope?: Array<PivotItem | string>) Sorts the PivotField by specified values in a given scope. The scope defines which specific values will be used to sort when
PivotLayout autoFormat Specifies whether formatting will be automatically formatted when it’s refreshed or when fields are moved
getDataHierarchy(cell: Range | string) Gets the DataHierarchy that is used to calculate the value in a specified range within the PivotTable.
getPivotItems(axis: Excel.PivotAxis, cell: Range | string) Gets the PivotItems from an axis that make up the value in a specified range within the PivotTable.
getPivotItems(axisString: "Unknown" | "Row" | "Column" | "Data" | "Filter", cell: Range | string) Gets the PivotItems from an axis that make up the value in a specified range within the PivotTable.
preserveFormatting Specifies whether formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items.
setAutoSortOnCell(cell: Range | string, sortBy: Excel.SortBy) 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.
setAutoSortOnCell(cell: Range | string, sortByString: "Ascending" | "Descending") 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.
PivotTable enableDataValueEditing Specifies whether the PivotTable allows values in the data body to be edited by the user.
useCustomSortLists Specifies whether the PivotTable uses custom lists when sorting.
Range autoFill(destinationRange: Range | string, autoFillType?: Excel.AutoFillType) Fills range from the current range to the destination range.
autoFill(destinationRange: Range | string, autoFillTypeString?: "FillDefault" | "FillCopy" | "FillSeries" | "FillFormats" | "FillValues" | "FillDays" | "FillWeekdays" | "FillMonths" | "FillYears" | "LinearTrend" | "GrowthTrend" | "FlashFill") Fills range from the current range to the destination range.
convertDataTypeToText() Converts the range cells with datatypes into text.
convertToLinkedDataType(serviceID: number, languageCulture: string) Converts the range cells into linked datatype in the worksheet.
copyFrom(sourceRange: Range | RangeAreas | string, copyType?: Excel.RangeCopyType, skipBlanks?: boolean, transpose?: boolean) Copies cell data or formatting from the source range or RangeAreas to the current range.
copyFrom(sourceRange: Range | RangeAreas | string, copyTypeString?: "All" | "Formulas" | "Values" | "Formats", skipBlanks?: boolean, transpose?: boolean) Copies cell data or formatting from the source range or RangeAreas to the current range.
find(text: string, criteria: Excel.SearchCriteria) Finds the given string based on the criteria specified.
findOrNullObject(text: string, criteria: Excel.SearchCriteria) Finds the given string based on the criteria specified.
flashFill() Does FlashFill to current range.Flash Fill will automatically fills data when it senses a pattern, so the range must be single column range and have data around in order to find pattern.
getCellProperties(cellPropertiesLoadOptions: CellPropertiesLoadOptions) Returns a 2D array, encapsulating the data for each cell's font, fill, borders, alignment, and other properties.
getColumnProperties(columnPropertiesLoadOptions: ColumnPropertiesLoadOptions) Returns a single-dimensional array, encapsulating the data for each column's font, fill, borders, alignment, and other properties. For properties that are not consistent across each cell within a given column, null will be returned.
getRowProperties(rowPropertiesLoadOptions: RowPropertiesLoadOptions) Returns a single-dimensional array, encapsulating the data for each row's font, fill, borders, alignment, and other properties. For properties that are not consistent across each cell within a given row, null will be returned.
getSpecialCells(cellType: Excel.SpecialCellType, cellValueType?: Excel.SpecialCellValueType) Gets the RangeAreas object, comprising one or more rectangular ranges, that represents all the cells that match the specified type and value.
getSpecialCells(cellTypeString: "ConditionalFormats" | "DataValidations" | "Blanks" | "Constants" | "Formulas" | "SameConditionalFormat" | "SameDataValidation" | "Visible", cellValueType?: "All" | "Errors" | "ErrorsLogical" | "ErrorsNumbers" | "ErrorsText" | "ErrorsLogicalNumber" | "ErrorsLogicalText" | "ErrorsNumberText" | "Logical" | "LogicalNumbers" | "LogicalText" | "LogicalNumbersText" | "Numbers" | "NumbersText" | "Text") Gets the RangeAreas object, comprising one or more rectangular ranges, that represents all the cells that match the specified type and value.
getSpecialCellsOrNullObject(cellType: Excel.SpecialCellType, cellValueType?: Excel.SpecialCellValueType) Gets the RangeAreas object, comprising one or more ranges, that represents all the cells that match the specified type and value.
getSpecialCellsOrNullObject(cellTypeString: "ConditionalFormats" | "DataValidations" | "Blanks" | "Constants" | "Formulas" | "SameConditionalFormat" | "SameDataValidation" | "Visible", cellValueType?: "All" | "Errors" | "ErrorsLogical" | "ErrorsNumbers" | "ErrorsText" | "ErrorsLogicalNumber" | "ErrorsLogicalText" | "ErrorsNumberText" | "Logical" | "LogicalNumbers" | "LogicalText" | "LogicalNumbersText" | "Numbers" | "NumbersText" | "Text") Gets the RangeAreas object, comprising one or more ranges, that represents all the cells that match the specified type and value.
getTables(fullyContained?: boolean) Gets a scoped collection of tables that overlap with the range.
linkedDataTypeState Represents the data type state of each cell. Read-only.
removeDuplicates(columns: number[], includesHeader: boolean) Removes duplicate values from the range specified by the columns.
replaceAll(text: string, replacement: string, criteria: Excel.ReplaceCriteria) Finds and replaces the given string based on the criteria specified within the current range.
setCellProperties(cellPropertiesData: SettableCellProperties[][]) Updates the range based on a 2D array of cell properties , encapsulating things like font, fill, borders, alignment, and so forth.
setColumnProperties(columnPropertiesData: SettableColumnProperties[]) Updates the range based on a single-dimensional array of column properties, encapsulating things like font, fill, borders, alignment, and so forth.
setDirty() Set a range to be recalculated when the next recalculation occurs.
setRowProperties(rowPropertiesData: SettableRowProperties[]) Updates the range based on a single-dimensional array of row properties, encapsulating things like font, fill, borders, alignment, and so forth.
RangeAreas calculate() Calculates all cells in the RangeAreas.
clear(applyTo?: Excel.ClearApplyTo) Clears values, format, fill, border, etc on each of the areas that comprise this RangeAreas object.
clear(applyToString?: "All" | "Formats" | "Contents" | "Hyperlinks" | "RemoveHyperlinks") Clears values, format, fill, border, etc on each of the areas that comprise this RangeAreas object.
convertDataTypeToText() Converts all cells in the RangeAreas with datatypes into text.
convertToLinkedDataType(serviceID: number, languageCulture: string) Converts all cells in the RangeAreas into linked datatype.
copyFrom(sourceRange: Range | RangeAreas | string, copyType?: Excel.RangeCopyType, skipBlanks?: boolean, transpose?: boolean) Copies cell data or formatting from the source range or RangeAreas to the current RangeAreas.
copyFrom(sourceRange: Range | RangeAreas | string, copyTypeString?: "All" | "Formulas" | "Values" | "Formats", skipBlanks?: boolean, transpose?: boolean) Copies cell data or formatting from the source range or RangeAreas to the current RangeAreas.
getEntireColumn() Returns a RangeAreas object that represents the entire columns of the RangeAreas (for example, if the current RangeAreas represents cells "B4:E11, H2", it returns a RangeAreas that represents columns "B:E, H:H").
getEntireRow() Returns a RangeAreas object that represents the entire rows of the RangeAreas (for example, if the current RangeAreas represents cells "B4:E11", it returns a RangeAreas that represents rows "4:11").
getIntersection(anotherRange: Range | RangeAreas | string) Returns the RangeAreas object that represents the intersection of the given ranges or RangeAreas. If no intersection is found, an ItemNotFound error will be thrown.
getIntersectionOrNullObject(anotherRange: Range | RangeAreas | string) Returns the RangeAreas object that represents the intersection of the given ranges or RangeAreas. If no intersection is found, a null object is returned.
getOffsetRangeAreas(rowOffset: number, columnOffset: number) Returns an RangeAreas object that is shifted by the specific row and column offset. The dimension of the returned RangeAreas will match the original object. If the resulting RangeAreas is forced outside the bounds of the worksheet grid, an error will be thrown.
getSpecialCells(cellType: Excel.SpecialCellType, cellValueType?: Excel.SpecialCellValueType) Returns a RangeAreas object that represents all the cells that match the specified type and value. Throws an error if no special cells are found that match the criteria.
getSpecialCells(cellTypeString: "ConditionalFormats" | "DataValidations" | "Blanks" | "Constants" | "Formulas" | "SameConditionalFormat" | "SameDataValidation" | "Visible", cellValueType?: "All" | "Errors" | "ErrorsLogical" | "ErrorsNumbers" | "ErrorsText" | "ErrorsLogicalNumber" | "ErrorsLogicalText" | "ErrorsNumberText" | "Logical" | "LogicalNumbers" | "LogicalText" | "LogicalNumbersText" | "Numbers" | "NumbersText" | "Text") Returns a RangeAreas object that represents all the cells that match the specified type and value. Throws an error if no special cells are found that match the criteria.
getSpecialCellsOrNullObject(cellType: Excel.SpecialCellType, cellValueType?: Excel.SpecialCellValueType) Returns a RangeAreas object that represents all the cells that match the specified type and value. Returns a null object if no special cells are found that match the criteria.
getSpecialCellsOrNullObject(cellTypeString: "ConditionalFormats" | "DataValidations" | "Blanks" | "Constants" | "Formulas" | "SameConditionalFormat" | "SameDataValidation" | "Visible", cellValueType?: "All" | "Errors" | "ErrorsLogical" | "ErrorsNumbers" | "ErrorsText" | "ErrorsLogicalNumber" | "ErrorsLogicalText" | "ErrorsNumberText" | "Logical" | "LogicalNumbers" | "LogicalText" | "LogicalNumbersText" | "Numbers" | "NumbersText" | "Text") Returns a RangeAreas object that represents all the cells that match the specified type and value. Returns a null object if no special cells are found that match the criteria.
getTables(fullyContained?: boolean) Returns a scoped collection of tables that overlap with any range in this RangeAreas object.
getUsedRangeAreas(valuesOnly?: boolean) Returns the used RangeAreas that comprises all the used areas of individual rectangular ranges in the RangeAreas object.
getUsedRangeAreasOrNullObject(valuesOnly?: boolean) Returns the used RangeAreas that comprises all the used areas of individual rectangular ranges in the RangeAreas object.
load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
address Returns the RageAreas reference in A1-style. Address value will contain the worksheet name for each rectangular block of cells (e.g. "Sheet1!A1:B4, Sheet1!D1:D4"). Read-only.
addressLocal Returns the RageAreas reference in the user locale. Read-only.
areaCount Returns the number of rectangular ranges that comprise this RangeAreas object.
areas Returns a collection of rectangular ranges that comprise this RangeAreas object.
cellCount Returns the number of cells in the RangeAreas object, summing up the cell counts of all of the individual rectangular ranges. Returns -1 if the cell count exceeds 2^31-1 (2,147,483,647). Read-only.
conditionalFormats Returns a collection of ConditionalFormats that intersect with any cells in this RangeAreas object. Read-only.
dataValidation Returns a dataValidation object for all ranges in the RangeAreas.
format Returns a rangeFormat object, encapsulating the the font, fill, borders, alignment, and other properties for all ranges in the RangeAreas object. Read-only.
isEntireColumn Indicates whether all the ranges on this RangeAreas object represent entire columns (e.g., "A:C, Q:Z"). Read-only.
isEntireRow Indicates whether all the ranges on this RangeAreas object represent entire rows (e.g., "1:3, 5:7"). Read-only.
worksheet Returns the worksheet for the current RangeAreas. Read-only.
setDirty() Sets the RangeAreas to be recalculated when the next recalculation occurs.
style Represents the style for all ranges in this RangeAreas object.
track() Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created.
untrack() Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect.
RangeBorder tintAndShade Returns or sets a double that lightens or darkens a color for Range Border, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color.
RangeBorderCollection tintAndShade Returns or sets a double that lightens or darkens a color for Range Borders, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color.
RangeCollection getCount() Returns the number of ranges in the RangeCollection.
getItemAt(index: number) Returns the range object based on its position in the RangeCollection.
load(option?: OfficeExtension.LoadOption)
load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
items Gets the loaded child items in this collection.
RangeFill pattern Gets or sets the pattern of a Range. See Excel.FillPattern for details. LinearGradient and RectangularGradient are not supported.
patternColor Sets HTML color code representing the color of the Range pattern, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange").
patternTintAndShade Returns or sets a double that lightens or darkens a pattern color for Range Fill, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color.
tintAndShade Returns or sets a double that lightens or darkens a color for Range Fill, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color.
RangeFont strikethrough Represents the strikethrough status of font. A null value indicates that the entire range doesn't have uniform Strikethrough setting.
subscript Represents the Subscript status of font.
superscript Represents the Superscript status of font.
tintAndShade Returns or sets a double that lightens or darkens a color for Range Font, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color.
RangeFormat autoIndent Indicates if text is automatically indented when text alignment is set to equal distribution.
indentLevel An integer from 0 to 250 that indicates the indent level.
readingOrder The reading order for the range.
shrinkToFit Indicates if text automatically shrinks to fit in the available column width.
RemoveDuplicatesResult load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
removed Number of duplicated rows removed by the operation.
uniqueRemaining Number of remaining unique rows present in the resulting range.
ReplaceCriteria completeMatch Specifies whether the match needs to be complete or partial. Default is false (partial).
matchCase Specifies whether the match is case sensitive. Default is false (insensitive).
RowProperties address Represents the address property.
addressLocal Represents the addressLocal property.
rowIndex Represents the rowIndex property.
SearchCriteria completeMatch Specifies whether the match needs to be complete or partial. Default is false (partial).
matchCase Specifies whether the match is case sensitive. Default is false (insensitive).
searchDirection Specifies the search direction. Default is forward. See Excel.SearchDirection.
SettableCellProperties format Represents the format property.
hyperlink Represents the hyperlink property.
style Represents the style property.
SettableColumnProperties columnHidden Represents the columnHidden property.
format Represents the format property.
SettableRowProperties format: Excel.CellPropertiesFormat Represents the format property.
rowHidden Represents the rowHidden property.
Shape altTextDescription Returns or sets the alternative description text for a Shape object.
altTextTitle Returns or sets the alternative title text for a Shape object.
delete() Removes the shape from the worksheet.
geometricShapeType Represents the geometric shape type of this geometric shape. See Excel.GeometricShapeType for details. Returns null if the shape type is not "GeometricShape".
getAsImage(format: Excel.PictureFormat) Converts the shape to an image and returns the image as a base64-encoded string. The DPI is 96. The only supported formats are Excel.PictureFormat.BMP, Excel.PictureFormat.PNG, Excel.PictureFormat.JPEG, and Excel.PictureFormat.GIF.
getAsImage(formatString: "UNKNOWN" | "BMP" | "JPEG" | "GIF" | "PNG" | "SVG") Converts the shape to an image and returns the image as a base64-encoded string. The DPI is 96. The only supported formats are Excel.PictureFormat.BMP, Excel.PictureFormat.PNG, Excel.PictureFormat.JPEG, and Excel.PictureFormat.GIF.
height Represents the height, in points, of the shape.
incrementLeft(increment: number) Moves the shape horizontally by the specified number of points.
incrementRotation(increment: number) Rotates the shape clockwise around the z-axis by the specified number of degrees.
incrementTop(increment: number) Moves the shape vertically by the specified number of points.
left The distance, in points, from the left side of the shape to the left side of the worksheet.
load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
lockAspectRatio Specifies whether or not the aspect ratio of this shape is locked.
name Represents the name of the shape.
connectionSiteCount Returns the number of connection sites on this shape. Read-only.
fill Returns the fill formatting of this shape. Read-only.
geometricShape Returns the geometric shape associated with the shape. An error will be thrown if the shape type is not "GeometricShape".
group Returns the shape group associated with the shape. An error will be thrown if the shape type is not "GroupShape".
id Represents the shape identifier. Read-only.
image Returns the image associated with the shape. An error will be thrown if the shape type is not "Image".
level Represents the level of the specified shape. For example, a level of 0 means that the shape is not part of any groups, a level of 1 means the shape is part of a top-level group, and a level of 2 means the shape is part of a sub-group of the top level.
line Returns the line associated with the shape. An error will be thrown if the shape type is not "Line".
lineFormat Returns the line formatting of this shape. Read-only.
onActivated Occurs when the shape is activated.
onDeactivated Occurs when the shape is deactivated.
parentGroup Represents the parent group of this shape.
textFrame Returns the text frame object of this shape. Read only.
type Returns the type of this shape. See Excel.ShapeType for details. Read-only.
zOrderPosition Returns the position of the specified shape in the z-order, with 0 representing the bottom of the order stack. Read-only.
rotation Represents the rotation, in degrees, of the shape.
scaleHeight(scaleFactor: number, scaleType: Excel.ShapeScaleType, scaleFrom?: Excel.ShapeScaleFrom) Scales the height of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current height.
scaleHeight(scaleFactor: number, scaleTypeString: "CurrentSize" | "OriginalSize", scaleFrom?: "ScaleFromTopLeft" | "ScaleFromMiddle" | "ScaleFromBottomRight") Scales the height of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current height.
scaleWidth(scaleFactor: number, scaleType: Excel.ShapeScaleType, scaleFrom?: Excel.ShapeScaleFrom) Scales the width of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current width.
scaleWidth(scaleFactor: number, scaleTypeString: "CurrentSize" | "OriginalSize", scaleFrom?: "ScaleFromTopLeft" | "ScaleFromMiddle" | "ScaleFromBottomRight") Scales the width of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current width.
setZOrder(position: Excel.ShapeZOrder) Moves the specified shape up or down the collection's z-order, which shifts it in front of or behind other shapes.
setZOrder(positionString: "BringToFront" | "BringForward" | "SendToBack" | "SendBackward") Moves the specified shape up or down the collection's z-order, which shifts it in front of or behind other shapes.
top The distance, in points, from the top edge of the shape to the top edge of the worksheet.
visible Represents the visibility of this shape.
width Represents the width, in points, of the shape.
ShapeActivatedEventArgs shapeId Gets the id of the activated shape.
type Gets the type of the event. See Excel.EventType for details.
worksheetId Gets the id of the worksheet in which the shape is activated.
ShapeCollection addGeometricShape(geometricShapeType: Excel.GeometricShapeType) Adds a geometric shape to the worksheet. Returns a Shape object that represents the new shape.
addGeometricShape(geometricShapeTypeString: "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus") Adds a geometric shape to the worksheet. Returns a Shape object that represents the new shape.
addGroup(values: Array<string | Shape>) Groups a subset of shapes in this collection's worksheet. Returns a Shape object that represents the new group of shapes.
addImage(base64ImageString: string) Creates an image from a base64-encoded string and adds it to the worksheet. Returns the Shape object that represents the new image.
addLine(startLeft: number, startTop: number, endLeft: number, endTop: number, connectorType?: Excel.ConnectorType) Adds a line to worksheet. Returns a Shape object that represents the new line.
addLine(startLeft: number, startTop: number, endLeft: number, endTop: number, connectorTypeString?: "Straight" | "Elbow" | "Curve") Adds a line to worksheet. Returns a Shape object that represents the new line.
addTextBox(text?: string) Adds a text box to the worksheet with the provided text as the content. Returns a Shape object that represents the new text box.
getCount() Returns the number of shapes in the worksheet. Read-only.
getItem(key: string) Gets a shape using its Name or ID.
getItemAt(index: number) Gets a shape using its position in the collection.
load(option?: OfficeExtension.LoadOption)
load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
items Gets the loaded child items in this collection.
ShapeDeactivatedEventArgs shapeId Gets the id of the shape deactivated shape.
type Gets the type of the event. See Excel.EventType for details.
worksheetId Gets the id of the worksheet in which the shape is deactivated.
ShapeFill clear() Clears the fill formatting of this shape.
foregroundColor Represents the shape fill foreground color in HTML color format, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange")
load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
type Returns the fill type of the shape. Read-only. See Excel.ShapeFillType for details.
setSolidColor(color: string) Sets the fill formatting of the shape to a uniform color. This changes the fill type to "Solid".
transparency Returns or sets the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns null if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type.
ShapeFont bold Represents the bold status of font. Returns null the TextRange includes both bold and non-bold text fragments.
color The HTML color code representation of the text color (e.g. "#FF0000" represents red). Returns null if the TextRange includes text fragments with different colors.
italic Represents the italic status of font. Returns null if the TextRange includes both italic and non-italic text fragments.
load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
name Represents font name (e.g. "Calibri"). If the text is Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name.
size Represents font size in points (e.g. 11). Returns null if the TextRange includes text fragments with different font sizes.
underline Type of underline applied to the font. Returns null if the TextRange includes text fragments with different underline styles. See Excel.ShapeFontUnderlineStyle for details.
ShapeGroup load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
id Represents the shape identifier. Read-only.
shape Returns the Shape object associated with the group. Read-only.
shapes Returns the collection of Shape objects. Read-only.
ungroup() Ungroups any grouped shapes in the specified shape group.
ShapeLineFormat color Represents the line color in HTML color format, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange").
dashStyle Represents the line style of the shape. Returns null when the line is not visible or there are inconsistent dash styles. See Excel.ShapeLineStyle for details.
load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
style Represents the line style of the shape. Returns null when the line is not visible or there are inconsistent styles. See Excel.ShapeLineStyle for details.
transparency Represents the degree of transparency of the specified line as a value from 0.0 (opaque) through 1.0 (clear). Returns null when the shape has inconsistent transparencies.
visible Represents whether or not the line formatting of a shape element is visible. Returns null when the shape has inconsistent visibilities.
weight Represents the weight of the line, in points. Returns null when the line is not visible or there are inconsistent line weights.
SortField subField Represents the subfield that is the target property name of a rich value to sort on.
StyleCollection getCount() Gets the number of styles in the collection.
getItemAt(index: number) Gets a style based on its position in the collection.
Table autoFilter Represents the AutoFilter object of the table. Read-Only.
TableAddedEventArgs source Gets the source of the event. See Excel.EventSource for details.
tableId Gets the id of the table that is added.
type Gets the type of the event. See Excel.EventType for details.
worksheetId Gets the id of the worksheet in which the table is added.
TableChangedEventArgs details Represents the information about the change detail
TableCollection onAdded Occurs when new table is added in a workbook.
onDeleted Occurs when the specified table is deleted in a workbook.
TableDeletedEventArgs source Specifies the source of the event. See Excel.EventSource for details.
tableId Specifies the id of the table that is deleted.
tableName Specifies the name of the table that is deleted.
type Specifies the type of the event. See Excel.EventType for details.
worksheetId Specifies the id of the worksheet in which the table is deleted.
TableScopedCollection getCount() Gets the number of tables in the collection.
getFirst() Gets the first table in the collection. The tables in the collection are sorted top to bottom and left to right, such that top left table is the first table in the collection.
getItem(key: string) Gets a table by Name or ID.
load(option?: OfficeExtension.LoadOption)
load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
items Gets the loaded child items in this collection.
TextFrame autoSizeSetting Gets or sets the automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing.
bottomMargin Represents the bottom margin, in points, of the text frame.
deleteText() Deletes all the text in the text frame.
horizontalAlignment Represents the horizontal alignment of the text frame. See Excel.ShapeTextHorizontalAlignment for details.
horizontalOverflow Represents the horizontal overflow behavior of the text frame. See Excel.ShapeTextHorizontalOverflow for details.
leftMargin Represents the left margin, in points, of the text frame.
load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
orientation Represents the text orientation of the text frame. See Excel.ShapeTextOrientation for details.
readingOrder Represents the reading order of the text frame, either left-to-right or right-to-left. See Excel.ShapeTextReadingOrder for details.
hasText Specifies whether the text frame contains text.
textRange Represents the text that is attached to a shape in the text frame, and properties and methods for manipulating the text. See Excel.TextRange for details.
rightMargin Represents the right margin, in points, of the text frame.
topMargin Represents the top margin, in points, of the text frame.
verticalAlignment Represents the vertical alignment of the text frame. See Excel.ShapeTextVerticalAlignment for details.
verticalOverflow Represents the vertical overflow behavior of the text frame. See Excel.ShapeTextVerticalOverflow for details.
TextRange getSubstring(start: number, length?: number) Returns a TextRange object for the substring in the given range.
load(propertyNames?: string | string[]) Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.
font Returns a ShapeFont object that represents the font attributes for the text range. Read-only.
text Represents the plain text content of the text range.
Workbook chartDataPointTrack True if all charts in the workbook are tracking the actual data points to which they are attached.
getActiveChart() Gets the currently active chart in the workbook. If there is no active chart, will throw exception when invoke this statement
getActiveChartOrNullObject() Gets the currently active chart in the workbook. If there is no active chart, will return null object
getIsActiveCollabSession() True if the workbook is being edited by multiple users (co-authoring).
getSelectedRanges() Gets the currently selected one or more ranges from the workbook. Unlike getSelectedRange(), this method returns a RangeAreas object that represents all the selected ranges.
isDirty Specifies whether or not changes have been made since the workbook was last saved.
autoSave Specifies whether or not the workbook is in autosave mode. Read-Only.
calculationEngineVersion Returns a number about the version of Excel Calculation Engine. Read-Only.
onAutoSaveSettingChanged Occurs when the autoSave setting is changed on the workbook.
previouslySaved Specifies whether or not the workbook has ever been saved locally or online. Read-Only.
usePrecisionAsDisplayed True if calculations in this workbook will be done using only the precision of the numbers as they're displayed.
WorkbookAutoSaveSetting ChangedEventArgs type Represents the type of the event. See Excel.EventType for details.
Worksheet enableCalculation Gets or sets the enableCalculation property of the worksheet.
findAll(text: string, criteria: Excel.WorksheetSearchCriteria) Finds all occurrences of the given string based on the criteria specified and returns them as a RangeAreas object, comprising one or more rectangular ranges.
findAllOrNullObject(text: string, criteria: Excel.WorksheetSearchCriteria) Finds all occurrences of the given string based on the criteria specified and returns them as a RangeAreas object, comprising one or more rectangular ranges.
getRanges(address?: string) Gets the RangeAreas object, representing one or more blocks of rectangular ranges, specified by the address or name.
autoFilter Represents the AutoFilter object of the worksheet. Read-Only.
horizontalPageBreaks Gets the horizontal page break collection for the worksheet. This collection only contains manual page breaks.
onFormatChanged Occurs when format changed on a specific worksheet.
pageLayout Gets the PageLayout object of the worksheet.
shapes Returns the collection of all the Shape objects on the worksheet. Read-only.
verticalPageBreaks Gets the vertical page break collection for the worksheet. This collection only contains manual page breaks.
replaceAll(text: string, replacement: string, criteria: Excel.ReplaceCriteria) Finds and replaces the given string based on the criteria specified within the current worksheet.
WorksheetChangedEventArgs details Represents the information about the change detail
WorksheetCollection onChanged Occurs when any worksheet in the workbook is changed.
onFormatChanged Occurs when any worksheet in the workbook has format changed.
onSelectionChanged Occurs when the selection changes on any worksheet.
WorksheetFormatChangedEventArgs address Gets the range address that represents the changed area of a specific worksheet.
getRange(ctx: Excel.RequestContext) Gets the range that represents the changed area of a specific worksheet.
getRangeOrNullObject(ctx: Excel.RequestContext) Gets the range that represents the changed area of a specific worksheet. It might return null object.
source Gets the source of the event. See Excel.EventSource for details.
type Gets the type of the event. See Excel.EventType for details.
worksheetId Gets the id of the worksheet in which the data changed.
WorksheetSearchCriteria completeMatch Specifies whether the match needs to be complete or partial. Default is false (partial).
matchCase Specifies whether the match is case sensitive. Default is false (insensitive).

What’s new in Excel JavaScript API 1.8

The Excel JavaScript API requirement set 1.8 features include APIs for PivotTables, data validation, charts, events for charts, performance options, and workbook creation.

PivotTable

Wave 2 of the PivotTable APIs lets add-ins set the hierarchies of a PivotTable. You can now control the data and how it is aggregated. Our PivotTable article has more on the new PivotTable functionality.

Data Validation

Data validation gives you control of what a user enters in a worksheet. You can limit cells to pre-defined answer sets or give pop-up warnings about undesirable input. Learn more about adding data validation to ranges today.

Charts

Another round of Chart APIs brings even greater programmatic control over chart elements. You now have greater access to the legend, axes, trendline, and plot area.

Events

More events have been added for charts. Have your add-in react to users interacting with the chart. You can also toggle events firing across the entire workbook.

Object What's new Description Requirement Set
application Method > createWorkbook(base64File: string) Creates a new hidden workbook by using an optional base64 encoded .xlsx file. 1.8
basicDataValidation Property > formula1 Gets or sets the Formula1, i.e. minimum value or value depending of the operator. 1.8
basicDataValidation Property > formula2 Gets or sets the Formula2, i.e. maximum value or value depending of the operator. 1.8
basicDataValidation Relationship > operator The operator to use for validating the data. 1.8
chart Property > categoryLabelLevel Returns or sets a ChartCategoryLabelLevel enumeration constant referring to the level of where the category labels are being sourced from. Read/Write. 1.8
chart Property > plotVisibleOnly True if only visible cells are plotted. False if both visible and hidden cells are plotted. ReadWrite. 1.8
chart Property > seriesNameLevel Returns or sets a ChartSeriesNameLevel enumeration constant referring to the level of where the series names are being sourced from. Read/Write. 1.8
chart Property > showDataLabelsOverMaximum Represents whether to show the data labels when the value is greater than the maximum value on the value axis. 1.8
chart Property > style Returns or sets the chart style for the chart. ReadWrite. 1.8
chart Relationship > displayBlanksAs Returns or sets the way that blank cells are plotted on a chart. ReadWrite. 1.8
chart Relationship > plotArea Represents the plotArea for the chart. Read-only. 1.8
chart Relationship > plotBy Returns or sets the way columns or rows are used as data series on the chart. ReadWrite. 1.8
chartActivatedEventArgs Property > chartId Gets the id of the chart that is activated. 1.8
chartActivatedEventArgs Property > type Gets the type of the event. 1.8
chartActivatedEventArgs Property > worksheetId Gets the id of the worksheet in which the chart is activated. 1.8
chartAddedEventArgs Property > chartId Gets the id of the chart that is added to the worksheet. 1.8
chartAddedEventArgs Property > type Gets the type of the event. 1.8
chartAddedEventArgs Property > worksheetId Gets the id of the worksheet in which the chart is added. 1.8
chartAddedEventArgs Relationship > source Gets the source of the event. 1.8
chartAxis Property > isBetweenCategories Represents whether value axis crosses the category axis between categories. 1.8
chartAxis Property > multiLevel Represents whether an axis is multilevel or not. 1.8
chartAxis Property > numberFormat Represents the format code for the axis tick label. 1.8
chartAxis Property > offset Represents the distance between the levels of labels, and the distance between the first level and the axis line. The value should be an integer from 0 to 1000. 1.8
chartAxis Property > positionAt Represents the specified axis position where the other axis crosses at. You should use the SetPositionAt(double) method to set this property. Read-only. 1.8
chartAxis Property > textOrientation Represents the text orientation of the axis tick label. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. 1.8
chartAxis Relationship > alignment Represents the alignment for the specified axis tick label. 1.8
chartAxis Relationship > position Represents the specified axis position where the other axis crosses. 1.8
chartAxis Method > setPositionAt(value: double) Set the specified axis position where the other axis crosses at. 1.8
chartAxisFormat Relationship > fill Represents chart fill formatting. Read-only. 1.8
chartAxisTitle Method > setFormula(formula: string) A string value that represents the formula of chart axis title using A1-style notation. 1.8
chartAxisTitleFormat Relationship > border Represents the border format, which includes color, linestyle, and weight. Read-only. 1.8
chartAxisTitleFormat Relationship > fill Represents chart fill formatting. Read-only. 1.8
chartBorder Method > clear() Clear the border format of a chart element. 1.8
chartDataLabel Property > autoText Boolean value representing if data label automatically generates appropriate text based on context. 1.8
chartDataLabel Property > formula String value that represents the formula of chart data label using A1-style notation. 1.8
chartDataLabel Property > height Returns the height, in points, of the chart data label. Read-only. Null if chart data label is not visible. Read-only. 1.8
chartDataLabel Property > left Represents the distance, in points, from the left edge of chart data label to the left edge of chart area. Null if chart data label is not visible. 1.8
chartDataLabel Property > numberFormat String value that represents the format code for data label. 1.8
chartDataLabel Property > text String representing the text of the data label on a chart. 1.8
chartDataLabel Property > textOrientation Represents the text orientation of chart data label. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. 1.8
chartDataLabel Property > top Represents the distance, in points, from the top edge of chart data label to the top of chart area. Null if chart data label is not visible. 1.8
chartDataLabel Property > width Returns the width, in points, of the chart data label. Read-only. Null if chart data label is not visible. Read-only. 1.8
chartDataLabel Relationship > format Represents the format of chart data label. Read-only. 1.8
chartDataLabel Relationship > horizontalAlignment Represents the horizontal alignment for chart data label. 1.8
chartDataLabel Relationship > verticalAlignment Represents the vertical alignment of chart data label. 1.8
chartDataLabelFormat Relationship > border Represents the border format, which includes color, linestyle, and weight. Read-only. 1.8
chartDataLabels Property > autoText Represents whether data labels automatically generate appropriate text based on context. 1.8
chartDataLabels Property > numberFormat Represents the format code for data labels. 1.8
chartDataLabels Property > textOrientation Represents the text orientation of data labels. The value should be an integer either from -90 to 90, or 0 to 180 for vertically-oriented text. 1.8
chartDataLabels Relationship > horizontalAlignment Represents the horizontal alignment for chart data label. 1.8
chartDataLabels Relationship > verticalAlignment Represents the vertical alignment of chart data label. 1.8
chartDeactivatedEventArgs Property > chartId Gets the id of the chart that is deactivated. 1.8
chartDeactivatedEventArgs Property > type Gets the type of the event. 1.8
chartDeactivatedEventArgs Property > worksheetId Gets the id of the worksheet in which the chart is deactivated. 1.8
chartDeletedEventArgs Property > chartId Gets the id of the chart that is deleted from the worksheet. 1.8
chartDeletedEventArgs Property > type Gets the type of the event. 1.8
chartDeletedEventArgs Property > worksheetId Gets the id of the worksheet in which the chart is deleted. 1.8
chartDeletedEventArgs Relationship > source Gets the source of the event. 1.8
chartLegendEntry Property > height Represents the height of the legendEntry on the chart legend. Read-only. 1.8
chartLegendEntry Property > index Represents the index of the legendEntry in the chart legend. Read-only. 1.8
chartLegendEntry Property > left Represents the left of a chart legendEntry. Read-only. 1.8
chartLegendEntry Property > top Represents the top of a chart legendEntry. Read-only. 1.8
chartLegendEntry Property > width Represents the width of the legendEntry on the chart Legend. Read-only. 1.8
chartLegendFormat Relationship > border Represents the border format, which includes color, linestyle, and weight. Read-only. 1.8
chartPlotArea Property > height Represents the height value of plotArea. 1.8
chartPlotArea Property > insideHeight Represents the insideHeight value of plotArea. 1.8
chartPlotArea Property > insideLeft Represents the insideLeft value of plotArea. 1.8
chartPlotArea Property > insideTop Represents the insideTop value of plotArea. 1.8
chartPlotArea Property > insideWidth Represents the insideWidth value of plotArea. 1.8
chartPlotArea Property > left Represents the left value of plotArea. 1.8
chartPlotArea Property > top Represents the top value of plotArea. 1.8
chartPlotArea Property > width Represents the width value of plotArea. 1.8
chartPlotArea Relationship > format Represents the formatting of a chart plotArea. Read-only. 1.8
chartPlotArea Relationship > position Represents the position of plotArea. 1.8
chartPlotAreaFormat Relationship > border Represents the border attributes of a chart plotArea. Read-only. 1.8
chartPlotAreaFormat Relationship > fill Represents the fill format of an object, which includes background formatting information. Read-only. 1.8
chartSeries Property > explosion Returns or sets the explosion value for a pie-chart or doughnut-chart slice. Returns 0 (zero) if there's no explosion (the tip of the slice is in the center of the pie). ReadWrite. 1.8
chartSeries Property > firstSliceAngle Returns or sets the angle of the first pie-chart or doughnut-chart slice, in degrees (clockwise from vertical). Applies only to pie, 3-D pie, and doughnut charts. Can be a value from 0 through 360. ReadWrite 1.8
chartSeries Property > invertIfNegative True if Microsoft Excel inverts the pattern in the item when it corresponds to a negative number. ReadWrite. 1.8
chartSeries Property > overlap Specifies how bars and columns are positioned. Can be a value between -100 and 100. Applies only to 2-D bar and 2-D column charts. ReadWrite. 1.8
chartSeries Property > secondPlotSize Returns or sets the size of the secondary section of either a pie of pie chart or a bar of pie chart, as a percentage of the size of the primary pie. Can be a value from 5 to 200. ReadWrite. 1.8
chartSeries Property > varyByCategories True if Microsoft Excel assigns a different color or pattern to each data marker. The chart must contain only one series. ReadWrite. 1.8
chartSeries Relationship > axisGroup Returns or sets the group for the specified series. ReadWrite 1.8
chartSeries Relationship > dataLabels Represents a collection of all dataLabels in the series. Read-only. 1.8
chartSeries Relationship > splitType Returns or sets the way the two sections of either a pie of pie chart or a bar of pie chart are split. ReadWrite. 1.8
chartTrendline Property > backwardPeriod Represents the number of periods that the trendline extends backward. 1.8
chartTrendline Property > forwardPeriod Represents the number of periods that the trendline extends forward. 1.8
chartTrendline Property > showEquation True if the equation for the trendline is displayed on the chart. 1.8
chartTrendline Property > showRSquared True if the R-squared for the trendline is displayed on the chart. 1.8
chartTrendline Relationship > label Represents the label of a chart trendline. Read-only. 1.8
chartTrendlineLabel Property > autoText Boolean value representing if trendline label automatically generates appropriate text based on context. 1.8
chartTrendlineLabel Property > formula String value that represents the formula of chart trendline label using A1-style notation. 1.8
chartTrendlineLabel Property > height Returns the height, in points, of the chart trendline label. Read-only. Null if chart trendline label is not visible. Read-only. 1.8
chartTrendlineLabel Property > left Represents the distance, in points, from the left edge of chart trendline label to the left edge of chart area. Null if chart trendline label is not visible. 1.8
chartTrendlineLabel Property > numberFormat String value that represents the format code for trendline label. 1.8
chartTrendlineLabel Property > text String representing the text of the trendline label on a chart. 1.8
chartTrendlineLabel Property > textOrientation Represents the text orientation of chart trendline label. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. 1.8
chartTrendlineLabel Property > top Represents the distance, in points, from the top edge of chart trendline label to the top of chart area. Null if chart trendline label is not visible. 1.8
chartTrendlineLabel Property > width Returns the width, in points, of the chart trendline label. Read-only. Null if chart trendline label is not visible. Read-only. 1.8
chartTrendlineLabel Relationship > format Represents the format of chart trendline label. Read-only. 1.8
chartTrendlineLabel Relationship > horizontalAlignment Represents the horizontal alignment for chart trendline label. 1.8
chartTrendlineLabel Relationship > verticalAlignment Represents the vertical alignment of chart trendline label. 1.8
chartTrendlineLabelFormat Relationship > border Represents the border format, which includes color, linestyle, and weight. Read-only. 1.8
chartTrendlineLabelFormat Relationship > fill Represents the fill format of the current chart trendline label. Read-only. 1.8
chartTrendlineLabelFormat Relationship > font Represents the font attributes (font name, font size, color, etc.) for a chart trendline label. Read-only. 1.8
customDataValidation Property > formula A custom data validation formula. This creates special input rules, such as preventing duplicates or limiting the total in a range of cells. 1.8
dataPivotHierarchy Property > id Id of the DataPivotHierarchy. Read-only. 1.8
dataPivotHierarchy Property > name Name of the DataPivotHierarchy. 1.8
dataPivotHierarchy Property > numberFormat Number format of the DataPivotHierarchy. 1.8
dataPivotHierarchy Property > position Position of the DataPivotHierarchy. 1.8
dataPivotHierarchy Relationship > field Returns the PivotFields associated with the DataPivotHierarchy. Read-only. 1.8
dataPivotHierarchy Relationship > showAs Determines whether the data should be shown as a specific summary calculation or not. 1.8
dataPivotHierarchy Relationship > summarizeBy Determines whether to show all items of the DataPivotHierarchy. 1.8
dataPivotHierarchy Method > setToDefault() Reset the DataPivotHierarchy back to its default values. 1.8
dataPivotHierarchyCollection Property > items A collection of dataPivotHierarchy objects. Read-only. 1.8
dataPivotHierarchyCollection Method > add(pivotHierarchy: PivotHierarchy) Adds the PivotHierarchy to the current axis. 1.8
dataPivotHierarchyCollection Method > getCount() Gets the number of pivot hierarchies in the collection. 1.8
dataPivotHierarchyCollection Method > getItem(name: string) Gets a DataPivotHierarchy by its name or id. 1.8
dataPivotHierarchyCollection Method > getItemOrNullObject(name: string) Gets a DataPivotHierarchy by name. If the DataPivotHierarchy does not exist, will return a null object. 1.8
dataPivotHierarchyCollection Method > remove(DataPivotHierarchy: DataPivotHierarchy) Removes the PivotHierarchy from the current axis. 1.8
dataValidation Property > ignoreBlanks Ignore blanks: no data validation will be performed on blank cells, it defaults to true. 1.8
dataValidation Property > valid Represents if all cell values are valid according to the data validation rules. Read-only. 1.8
dataValidation Relationship > errorAlert Error alert when user enters invalid data. 1.8
dataValidation Relationship > prompt Prompt when users selects a cell. 1.8
dataValidation Relationship > rule Data validation rule that contains different types of data validation criteria. 1.8
dataValidation Relationship > type Type of the data validation, see Excel.DataValidationType for details. Read-only. 1.8
dataValidation Method > clear() Clears the data validation from the current range. 1.8
dataValidationErrorAlert Property > message Represents error alert message. 1.8
dataValidationErrorAlert Property > showAlert Determines whether to show an error alert dialog or not when a user enters invalid data. The default is true. 1.8
dataValidationErrorAlert Property > title Represents error alert dialog title. 1.8
dataValidationErrorAlert Relationship > style Represents data validation alert type, please see Excel.DataValidationAlertStyle for details. 1.8
dataValidationPrompt Property > message Represents the message of the prompt. 1.8
dataValidationPrompt Property > showPrompt Determines whether or not to show the prompt when user selects a cell with data validation. 1.8
dataValidationPrompt Property > title Represents the title for the prompt. 1.8
dataValidationRule Relationship > custom Custom data validation criteria. 1.8
dataValidationRule Relationship > date Date data validation criteria. 1.8
dataValidationRule Relationship > decimal Decimal data validation criteria. 1.8
dataValidationRule Relationship > list List data validation criteria. 1.8
dataValidationRule Relationship > textLength TextLength data validation criteria. 1.8
dataValidationRule Relationship > time Time data validation criteria. 1.8
dataValidationRule Relationship > wholeNumber WholeNumber data validation criteria. 1.8
dateTimeDataValidation Property > formula1 Gets or sets the Formula1, i.e. minimum value or value depending on the operator. 1.8
dateTimeDataValidation Property > formula2 Gets or sets the Formula2, i.e. maximum value or value depending on the operator. 1.8
dateTimeDataValidation Relationship > operator The operator to use for validating the data. 1.8
filterPivotHierarchy Property > enableMultipleFilterItems Determines whether to allow multiple filter items. 1.8
filterPivotHierarchy Property > id Id of the FilterPivotHierarchy. Read-only. 1.8
filterPivotHierarchy Property > name Name of the FilterPivotHierarchy. 1.8
filterPivotHierarchy Property > position Position of the FilterPivotHierarchy. 1.8
filterPivotHierarchy Relationship > fields Returns the PivotFields associated with the FilterPivotHierarchy. Read-only. 1.8
filterPivotHierarchy Method > setToDefault() Reset the FilterPivotHierarchy back to its default values. 1.8
filterPivotHierarchyCollection Property > items A collection of filterPivotHierarchy objects. Read-only. 1.8
filterPivotHierarchyCollection Method > add(pivotHierarchy: PivotHierarchy) Adds the PivotHierarchy to the current axis. If the hierarchy is present elsewhere on the row, column, or filter axis, it will be removed from that location. 1.8
filterPivotHierarchyCollection Method > getCount() Gets the number of pivot hierarchies in the collection. 1.8
filterPivotHierarchyCollection Method > getItem(name: string) Gets a FilterPivotHierarchy by its name or id. 1.8
filterPivotHierarchyCollection Method > getItemOrNullObject(name: string) Gets a FilterPivotHierarchy by name. If the FilterPivotHierarchy does not exist, will return a null object. 1.8
filterPivotHierarchyCollection Method > remove(filterPivotHierarchy: FilterPivotHierarchy) Removes the PivotHierarchy from the current axis. 1.8
listDataValidation Property > inCellDropDown Displays the list in cell drop down or not, it defaults to true. 1.8
listDataValidation Property > source Source of the list for data validation 1.8
pivotField Property > id Id of the PivotField. Read-only. 1.8
pivotField Property > name Name of the PivotField. 1.8
pivotField Property > showAllItems Determines whether to show all items of the PivotField. 1.8
pivotField Relationship > items Returns the PivotFields associated with the PivotField. Read-only. 1.8
pivotField Relationship > subtotals Subtotals of the PivotField. 1.8
pivotField Method > sortByLabels(sortby: SortBy) Sorts the PivotField. If a DataPivotHierarchy is specified, then sort will be applied based on it, if not sort will be based on the PivotField itself. 1.8
pivotFieldCollection Property > items A collection of pivotField objects. Read-only. 1.8
pivotFieldCollection Method > getCount() Gets the number of pivot hierarchies in the collection. 1.8
pivotFieldCollection Method > getItem(name: string) Gets a PivotHierarchy by its name or id. 1.8
pivotFieldCollection Method > getItemOrNullObject(name: string) Gets a PivotHierarchy by name. If the PivotHierarchy does not exist, will return a null object. 1.8
pivotHierarchy Property > id Id of the PivotHierarchy. Read-only. 1.8
pivotHierarchy Property > name Name of the PivotHierarchy. 1.8
pivotHierarchy Relationship > fields Returns the PivotFields associated with the PivotHierarchy. Read-only. 1.8
pivotHierarchyCollection Property > items A collection of pivotHierarchy objects. Read-only. 1.8
pivotHierarchyCollection Method > getCount() Gets the number of pivot hierarchies in the collection. 1.8
pivotHierarchyCollection Method > getItem(name: string) Gets a PivotHierarchy by its name or id. 1.8
pivotHierarchyCollection Method > getItemOrNullObject(name: string) Gets a PivotHierarchy by name. If the PivotHierarchy does not exist, will return a null object. 1.8
pivotItem Property > id Id of the PivotItem. Read-only. 1.8
pivotItem Property > isExpanded Determines whether the item is expanded to show child items or if it's collapsed and child items are hidden. 1.8
pivotItem Property > name Name of the PivotItem. 1.8
pivotItem Property > visible Determines whether the PivotItem is visible or not. 1.8
pivotItemCollection Property > items A collection of pivotItem objects. Read-only. 1.8
pivotItemCollection Method > getCount() Gets the number of pivot hierarchies in the collection. 1.8
pivotItemCollection Method > getItem(name: string) Gets a PivotHierarchy by its name or id. 1.8
pivotItemCollection Method > getItemOrNullObject(name: string) Gets a PivotHierarchy by name. If the PivotHierarchy does not exist, will return a null object. 1.8
pivotLayout Property > showColumnGrandTotals True if the PivotTable report shows grand totals for columns. 1.8
pivotLayout Property > showRowGrandTotals True if the PivotTable report shows grand totals for rows. 1.8
pivotLayout Property > subtotalLocation This property indicates the SubtotalLocationType of all fields on the PivotTable. If fields have different states, this will be null. Possible values are: AtTop, AtBottom. 1.8
pivotLayout Relationship > layoutType This property indicates the PivotLayoutType of all fields on the PivotTable. If fields have different states, this will be null. 1.8
pivotLayout Method > getColumnLabelRange() Returns the range where the PivotTable's column labels reside. 1.8
pivotLayout Method > getDataBodyRange() Returns the range where the PivotTable's data values reside. 1.8
pivotLayout Method > getFilterAxisRange() Returns the range of the PivotTable's filter area. 1.8
pivotLayout Method > getRange() Returns the range the PivotTable exists on, excluding the filter area. 1.8
pivotLayout Method > getRowLabelRange() Returns the range where the PivotTable's row labels reside. 1.8
pivotTable Relationship > columnHierarchies The Column Pivot Hierarchies of the PivotTable. Read-only. 1.8
pivotTable Relationship > dataHierarchies The Data Pivot Hierarchies of the PivotTable. Read-only. 1.8
pivotTable Relationship > filterHierarchies The Filter Pivot Hierarchies of the PivotTable. Read-only. 1.8
pivotTable Relationship > hierarchies The Pivot Hierarchies of the PivotTable. Read-only. 1.8
pivotTable Relationship > layout The PivotLayout describing the layout and visual structure of the PivotTable. Read-only. 1.8
pivotTable Relationship > rowHierarchies The Row Pivot Hierarchies of the PivotTable. Read-only. 1.8
pivotTable Method > delete() Deletes the PivotTable. 1.8
pivotTableCollection Method > add(name: string, source: object, destination: object) Add a Pivottable based on the specified source data and insert it at the top left cell of the destination range. 1.8
range Relationship > dataValidation Returns a data validation object. Read-only. 1.8
rowColumnPivotHierarchy Property > id Id of the RowColumnPivotHierarchy. Read-only. 1.8
rowColumnPivotHierarchy Property > name Name of the RowColumnPivotHierarchy. 1.8
rowColumnPivotHierarchy Property > position Position of the RowColumnPivotHierarchy. 1.8
rowColumnPivotHierarchy Relationship > fields Returns the PivotFields associated with the RowColumnPivotHierarchy. Read-only. 1.8
rowColumnPivotHierarchy Method > setToDefault() Reset the RowColumnPivotHierarchy back to its default values. 1.8
rowColumnPivotHierarchyCollection Property > items A collection of rowColumnPivotHierarchy objects. Read-only. 1.8
rowColumnPivotHierarchyCollection Method > add(pivotHierarchy: PivotHierarchy) Adds the PivotHierarchy to the current axis. If the hierarchy is present elsewhere on the row, column, 1.8
rowColumnPivotHierarchyCollection Method > getCount() Gets the number of pivot hierarchies in the collection. 1.8
rowColumnPivotHierarchyCollection Method > getItem(name: string) Gets a RowColumnPivotHierarchy by its name or id. 1.8
rowColumnPivotHierarchyCollection Method > getItemOrNullObject(name: string) Gets a RowColumnPivotHierarchy by name. If the RowColumnPivotHierarchy does not exist, will return a null object. 1.8
rowColumnPivotHierarchyCollection Method > remove(rowColumnPivotHierarchy: RowColumnPivotHierarchy) Removes the PivotHierarchy from the current axis. 1.8
runtime Property > enableEvents Toggle JavaScript events in the current taskpane or content add-in. 1.8
showAsRule Relationship > baseField The base PivotField to base the ShowAs calculation, if applicable based on the ShowAsCalculation type, else null. 1.8
showAsRule Relationship > baseItem The base Item to base the ShowAs calculation on, if applicable based on the ShowAsCalculation type, else null. 1.8
showAsRule Relationship > calculation The ShowAs Calculation to use for the Data PivotField. 1.8
style Property > autoIndent Indicates if text is automatically indented when the text alignment in a cell is set to equal distribution. 1.8
style Property > textOrientation The text orientation for the style. 1.8
subtotals Property > automatic If Automatic is set to true, then all other values will be ignored when setting the Subtotals. 1.8
subtotals Property > average 1.8
subtotals Property > count 1.8
subtotals Property > countNumbers 1.8
subtotals Property > max 1.8
subtotals Property > min 1.8
subtotals Property > product 1.8
subtotals Property > standardDeviation 1.8
subtotals Property > standardDeviationP 1.8
subtotals Property > sum 1.8
subtotals Property > variance 1.8
subtotals Property > varianceP 1.8
table Property > legacyId Returns a numeric id. Read-only. 1.8
workbook Property > readOnly True if the workbook is open in Read-only mode. Read-only. 1.8
workbookCreated Property > id Returns a value that uniquely identifies the WorkbookCreated object. Read-only. 1.8
workbookCreated Method > open() Open the workbook. 1.8
worksheet Property > showGridlines Gets or sets the worksheet's gridlines flag. 1.8
worksheet Property > showHeadings Gets or sets the worksheet's headings flag. 1.8
worksheetCalculatedEventArgs Property > type Gets the type of the event. 1.8
worksheetCalculatedEventArgs Property > worksheetId Gets the id of the worksheet that is calculated. 1.8

What's new in Excel JavaScript API 1.7

The Excel JavaScript API requirement set 1.7 features include APIs for charts, events, worksheets, ranges, document properties, named items, protection options and styles.

Customize charts

With the new chart APIs, you can create additional chart types, add a data series to a chart, set the chart title, add an axis title, add display unit, add a trendline with moving average, change a trendline to linear, and more. The following are some examples:

  • Chart axis - get, set, format and remove axis unit, label and title in a chart.
  • Chart series - add, set, and delete a series in a chart. Change series markers, plot orders and sizing.
  • Chart trendlines - add, get, and format trendlines in a chart.
  • Chart legend - format the legend font in a chart.
  • Chart point - set chart point color.
  • Chart title substring - get and set title substring for a chart.
  • Chart type - option to create more chart types.

Events

Excel events APIs provide a variety of event handlers that allow your add-in to automatically run a designated function when a specific event occurs. You can design that function to perform whatever actions your scenario requires. For a list of events that are currently available, see Work with Events using the Excel JavaScript API.

Customize the appearance of worksheets and ranges

Using the new APIs, you can customize the appearance of worksheets in multiple ways:

  • Freeze panes to keep specific rows or columns visible when you scroll in the worksheet. For example, if the first row in your worksheet contains headers, you might freeze that row so that the column headers will remain visible as you scroll down the worksheet.
  • Modify the worksheet tab color.
  • Add worksheet headings.

You can customize the appearance of ranges in multiple ways:

  • Set the cell style for a range to ensure sure that all cells in the range have consistent formatting. A cell style is a defined set of formatting characteristics, such as fonts and font sizes, number formats, cell borders, and cell shading. Use any of Excel's built-in cell styles or create your own custom cell style.
  • Set the text orientation for a range.
  • Add or modify a hyperlink on a range that links to another location in the workbook or to an external location.

Manage document properties

Using the document properties APIs, you can access built-in document properties and also create and manage custom document properties to store state of the workbook and drive workflow and business logic.

Copy worksheets

Using the worksheet copy APIs, you can copy the data and format from one worksheet to a new worksheet within the same workbook and reduce the amount of data transfer needed.

Handle ranges with ease

Using the various range APIs, you can do things such as get the surrounding region, get a resized range, and more. These APIs should make tasks like range manipulation and addressing much more efficient.

In addition:

  • Workbook and worksheet protection options - use these APIs to protect data in a worksheet and the workbook structure.
  • Update a named item - use this API to update a named item.
  • Get active cell - use this API to get the active cell of a workbook.
Object What is new Description Requirement set
chart Property > chartType Represents the type of the chart. Possible values are: ColumnClustered, ColumnStacked, ColumnStacked100, BarClustered, BarStacked, BarStacked100, LineStacked, LineStacked100, LineMarkers, LineMarkersStacked, LineMarkersStacked100, PieOfPie, etc.. 1.7
chart Property > id The unique id of chart. Read-only. 1.7
chart Property > showAllFieldButtons Represents whether to display all field buttons on a PivotChart. 1.7
chartAreaFormat Relationship > border Represents the border format of chart area, which includes color, linestyle and weight. Read-only. 1.7
chartAxes Method > getItem(type: string, group: string) Returns the specific axis identified by type and group. 1.7
chartAxis Property > axisBetweenCategories Represents whether value axis crosses the category axis between categories. 1.7
chartAxis Property > axisGroup Represents the group for the specified axis. Read-only. Possible values are: Primary, Secondary. 1.7
chartAxis Property > categoryType Returns or sets the category axis type. Possible values are: Automatic, TextAxis, DateAxis. 1.7
chartAxis Property > crosses Represents the specified axis where the other axis crosses. Possible values are: Automatic, Maximum, Minimum, Custom. 1.7
chartAxis Property > crossesAt Represents the specified axis where the other axis crosses at. Read Only. Set to this property should use SetCrossesAt(double) method. Read-only. 1.7
chartAxis Property > customDisplayUnit Represents the custom axis display unit value. Read Only. To set this property, please use the SetCustomDisplayUnit(double) method. Read-only. 1.7
chartAxis Property > displayUnit Represents the axis display unit. Possible values are: None, Hundreds, Thousands, TenThousands, HundredThousands, Millions, TenMillions, HundredMillions, Billions, Trillions, Custom. 1.7
chartAxis Property > height Represents the height, in points, of the chart axis. Null if the axis's not visible. Read-only. 1.7
chartAxis Property > left Represents the distance, in points, from the left edge of the axis to the left of chart area. Null if the axis's not visible. Read-only. 1.7
chartAxis Property > logBase Represents the base of the logarithm when using logarithmic scales. 1.7
chartAxis Property > reversePlotOrder Represents whether Microsoft Excel plots data points from last to first. 1.7
chartAxis Property > scaleType Represents the value axis scale type. Possible values are: Linear, Logarithmic. 1.7
chartAxis Property > showDisplayUnitLabel Represents whether the axis display unit label is visible. 1.7
chartAxis Property > tickLabelSpacing Represents the number of categories or series between tick-mark labels. Can be a value from 1 through 31999 or an empty string for automatic setting. The returned value is always a number. 1.7
chartAxis Property > tickMarkSpacing Represents the number of categories or series between tick marks. 1.7
chartAxis Property > top Represents the distance, in points, from the top edge of the axis to the top of chart area. Null if the axis's not visible. Read-only. 1.7
chartAxis Property > type Represents the axis type. Read-only. Possible values are: Invalid, Category, Value, Series. 1.7
chartAxis Property > visible A boolean value represents the visibility of the axis. 1.7
chartAxis Property > width Represents the width, in points, of the chart axis. Null if the axis's not visible. Read-only. 1.7
chartAxis Relationship > baseTimeUnit Returns or sets the base unit for the specified category axis. 1.7
chartAxis Relationship > majorTickMark Represents the type of major tick mark for the specified axis. 1.7
chartAxis Relationship > majorTimeUnitScale Returns or sets the major unit scale value for the category axis when the CategoryType property is set to TimeScale. 1.7
chartAxis Relationship > minorTickMark Represents the type of minor tick mark for the specified axis. 1.7
chartAxis Relationship > minorTimeUnitScale Returns or sets the minor unit scale value for the category axis when the CategoryType property is set to TimeScale. 1.7
chartAxis Relationship > tickLabelPosition Represents the position of tick-mark labels on the specified axis. 1.7
chartAxis Method > setCategoryNames(sourceData: Range) Sets all the category names for the specified axis. 1.7
chartAxis Method > setCrossesAt(value: double) Set the specified axis where the other axis crosses at. 1.7
chartAxis Method > setCustomDisplayUnit(value: double) Sets the axis display unit to a custom value. 1.7
chartBorder Property > color HTML color code representing the color of borders in the chart. 1.7
chartBorder Property > weight Represents weight of the border, in points. 1.7
chartBorder Relationship > lineStyle Represents the line style of the border. 1.7
chartDataLabel Property > position DataLabelPosition value that represents the position of the data label. Possible values are: None, Center, InsideEnd, InsideBase, OutsideEnd, Left, Right, Top, Bottom, BestFit, Callout. 1.7
chartDataLabel Property > separator String representing the separator used for the data label on a chart. 1.7
chartDataLabel Property > showBubbleSize Boolean value representing if the data label bubble size is visible or not. 1.7
chartDataLabel Property > showCategoryName Boolean value representing if the data label category name is visible or not. 1.7
chartDataLabel Property > showLegendKey Boolean value representing if the data label legend key is visible or not. 1.7
chartDataLabel Property > showPercentage Boolean value representing if the data label percentage is visible or not. 1.7
chartDataLabel Property > showSeriesName Boolean value representing if the data label series name is visible or not. 1.7
chartDataLabel Property > showValue Boolean value representing if the data label value is visible or not. 1.7
chartLegend Property > height Represents the height of the legend on the chart. 1.7
chartLegend Property > left Represents the left of a chart legend. 1.7
chartLegend Property > showShadow Represents if the legend has shadow on the chart. 1.7
chartLegend Property > top Represents the top of a chart legend. 1.7
chartLegend Property > width Represents the width of the legend on the chart. 1.7
chartLegend Relationship > legendEntries Represents a collection of legendEntries in the legend. Read-only. 1.7
chartLegendEntry Property > visible Represents the visible of a chart legend entry. 1.7
chartLegendEntryCollection Property > items A collection of chartLegendEntry objects. Read-only. 1.7
chartLegendEntryCollection Method > getCount() Returns the number of legendEntry in the collection. 1.7
chartLegendEntryCollection Method > getItemAt(index: number) Returns a legendEntry at the given index. 1.7
chartPoint Property > hasDataLabel Represents whether a data point has datalabel. Not applicable for surface charts. 1.7
chartPoint Property > markerBackgroundColor HTML color code representation of the marker background color of data point. E.g. #FF0000 represents Red. 1.7
chartPoint Property > markerForegroundColor HTML color code representation of the marker foreground color of data point. E.g. #FF0000 represents Red. 1.7
chartPoint Property > markerSize Represents marker size of data point. 1.7
chartPoint Property > markerStyle Represents marker style of a chart data point. Possible values are: Invalid, Automatic, None, Square, Diamond, Triangle, X, Star, Dot, Dash, Circle, Plus, Picture. 1.7
chartPoint Relationship > dataLabel Returns the data label of a chart point. Read-only. 1.7
chartPointFormat Relationship > border Represents the border format of a chart data point, which includes color, style and weight information. Read-only. 1.7
chartSeries Property > chartType Represents the chart type of a series. Possible values are: ColumnClustered, ColumnStacked, ColumnStacked100, BarClustered, BarStacked, BarStacked100, LineStacked, LineStacked100, LineMarkers, LineMarkersStacked, LineMarkersStacked100, PieOfPie, etc.. 1.7
chartSeries Property > doughnutHoleSize Represents the doughnut hole size of a chart series. Only valid on doughnut and doughnutExploded charts. 1.7
chartSeries Property > filtered Boolean value representing if the series is filtered or not. Not applicable for surface charts. 1.7
chartSeries Property > gapWidth Represents the gap width of a chart series. Only valid on bar and column charts, as well as 1.7
chartSeries Property > hasDataLabels Boolean value representing if the series has data labels or not. 1.7
chartSeries Property > markerBackgroundColor Represents markers background color of a chart series. 1.7
chartSeries Property > markerForegroundColor Represents markers foreground color of a chart series. 1.7
chartSeries Property > markerSize Represents marker size of a chart series. 1.7
chartSeries Property > markerStyle Represents marker style of a chart series. Possible values are: Invalid, Automatic, None, Square, Diamond, Triangle, X, Star, Dot, Dash, Circle, Plus, Picture. 1.7
chartSeries Property > plotOrder Represents the plot order of a chart series within the chart group. 1.7
chartSeries Property > showShadow Boolean value representing if the series has shadow or not. 1.7
chartSeries Property > smooth Boolean value representing if the series is smooth or not. Only for line and scatter charts. 1.7
chartSeries Relationship > dataLabels Represents a collection of all dataLabels in the series. Read-only. ApiSet.InProgressFeatures.ChartingAPI
chartSeries Relationship > trendlines Represents a collection of trendlines in the series. Read-only. 1.7
chartSeries Method > delete() Deletes the chart series. 1.7
chartSeries Method > setBubbleSizes(sourceData: Range) Set bubble sizes for a chart series. Only works for bubble charts. 1.7
chartSeries Method > setValues(sourceData: Range) Set values for a chart series. For scatter chart, it means Y axis values. 1.7
chartSeries Method > setXAxisValues(sourceData: Range) Set values of X axis for a chart series. Only works for scatter charts. 1.7
chartSeriesCollection Method > add(name: string, index: number) Add a new series to the collection. 1.7
chartTitle Property > height Returns the height, in points, of the chart title. Read-only. Null if chart title's not visible. Read-only. 1.7
chartTitle Property > horizontalAlignment Represents the horizontal alignment for chart title. Possible values are: Center, Left, Justify, Distributed, Right. 1.7
chartTitle Property > left Represents the distance, in points, from the left edge of chart title to the left edge of chart area. Null if chart title's not visible. 1.7
chartTitle Property > position Represents the position of chart title. Possible values are: Top, Automatic, Bottom, Right, Left. 1.7
chartTitle Property > showShadow Represents a boolean value that determines if the chart title has a shadow. 1.7
chartTitle Property > textOrientation Represents the text orientation of chart title. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. 1.7
chartTitle Property > top Represents the distance, in points, from the top edge of chart title to the top of chart area. Null if chart title's not visible. 1.7
chartTitle Property > verticalAlignment Represents the vertical alignment of chart title. Possible values are: Center, Bottom, Top, Justify, Distributed. 1.7
chartTitle Property > width Returns the width, in points, of the chart title. Read-only. Null if chart title's not visible. Read-only. 1.7
chartTitle Method > setFormula(formula: string) Sets a string value that represents the formula of chart title using A1-style notation. 1.7
chartTitleFormat Relationship > border Represents the border format of chart title, which includes color, linestyle and weight. Read-only. 1.7
chartTrendline Property > backward Represents the number of periods that the trendline extends backward. 1.7
chartTrendline Property > displayEquation True if the equation for the trendline is displayed on the chart. 1.7
chartTrendline Property > displayRSquared True if the R-squared for the trendline is displayed on the chart. 1.7
chartTrendline Property > forward Represents the number of periods that the trendline extends forward. 1.7
chartTrendline Property > intercept Represents the intercept value of the trendline. Can be set to a numeric value or an empty string (for automatic values). The returned value is always a number. 1.7
chartTrendline Property > movingAveragePeriod Represents the period of a chart trendline, only for trendline with MovingAverage type. 1.7
chartTrendline Property > name Represents the name of the trendline. Can be set to a string value, or can be set to null value represents automatic values. The returned value is always a string 1.7
chartTrendline Property > polynomialOrder Represents the order of a chart trendline, only for trendline with Polynomial type. 1.7
chartTrendline Property > type Represents the type of a chart trendline. Possible values are: Linear, Exponential, Logarithmic, MovingAverage, Polynomial, Power. 1.7
chartTrendline Relationship > format Represents the formatting of a chart trendline. Read-only. 1.7
chartTrendline Method > delete() Delete the trendline object. 1.7
chartTrendlineCollection Property > items A collection of chartTrendline objects. Read-only. 1.7
chartTrendlineCollection Method > add(type: string) Adds a new trendline to trendline collection. 1.7
chartTrendlineCollection Method > getCount() Returns the number of trendlines in the collection. 1.7
chartTrendlineCollection Method > getItem(index: number) Get trendline object by index, which is the insertion order in items array. 1.7
chartTrendlineFormat Relationship > line Represents chart line formatting. Read-only. 1.7
customProperty Property > key Gets the key of the custom property. Read only. Read-only. 1.7
customProperty Property > type Gets the value type of the custom property. Read only. Read-only. Possible values are: Number, Boolean, Date, String, Float. 1.7
customProperty Property > value Gets or sets the value of the custom property. 1.7
customProperty Method > delete() Deletes the custom property. 1.7
customPropertyCollection Property > items A collection of customProperty objects. Read-only. 1.7
customPropertyCollection Method > add(key: string, value: object) Creates a new or sets an existing custom property. 1.7
customPropertyCollection Method > deleteAll() Deletes all custom properties in this collection. 1.7
customPropertyCollection Method > getCount() Gets the count of custom properties. 1.7
customPropertyCollection Method > getItem(key: string) Gets a custom property object by its key, which is case-insensitive. Throws if the custom property does not exist. 1.7
customPropertyCollection Method > getItemOrNullObject(key: string) Gets a custom property object by its key, which is case-insensitive. Returns a null object if the custom property does not exist. 1.7
dataConnectionCollection Property > items A collection of dataConnection objects. Read-only. 1.7
dataConnectionCollection Method > refreshAll() Refreshes all the Data Connections in the collection. 1.7
documentProperties Property > author Gets or sets the author of the workbook. 1.7
documentProperties Property > category Gets or sets the category of the workbook. 1.7
documentProperties Property > comments Gets or sets the comments of the workbook. 1.7
documentProperties Property > company Gets or sets the company of the workbook. 1.7
documentProperties Property > keywords Gets or sets the keywords of the workbook. 1.7
documentProperties Property > lastAuthor Gets the last author of the workbook. Read only. Read-only. 1.7
documentProperties Property > manager Gets or sets the manager of the workbook. 1.7
documentProperties Property > revisionNumber Gets the revision number of the workbook. Read only. 1.7
documentProperties Property > subject Gets or sets the subject of the workbook. 1.7
documentProperties Property > title Gets or sets the title of the workbook. 1.7
documentProperties Relationship > creationDate Gets the creation date of the workbook. Read only. Read-only. 1.7
documentProperties Relationship > custom Gets the collection of custom properties of the workbook. Read only. Read-only. 1.7
namedItem Property > formula Gets or sets the formula of the named item. Formula always starts with a '=' sign. 1.7
namedItem Relationship > arrayValues Returns an object containing values and types of the named item. Read-only. 1.7
namedItemArrayValues Property > types Represents the types for each item in the named item array Read-only. Possible values are: Unknown, Empty, String, Integer, Double, Boolean, Error. 1.7
namedItemArrayValues Property > values Represents the values of each item in the named item array. Read-only. 1.7
range Property > isEntireColumn Represents if the current range is an entire column. Read-only. 1.7
range Property > isEntireRow Represents if the current range is an entire row. Read-only. 1.7
range Property > numberFormatLocal Represents Excel's number format code for the given range as a string in the language of the user. 1.7
range Property > style Represents the style of the current range. This return either null or a string. 1.7
range Method > getAbsoluteResizedRange(numRows: number, numColumns: number) Gets a Range object with the same top-left cell as the current Range object, but with the specified numbers of rows and columns. 1.7
range Method > getImage() Renders the range as a base64-encoded image. 1.7
range Method > getSurroundingRegion() Returns a Range object that represents the surrounding region for the top-left cell in this range. A surrounding region is a range bounded by any combination of blank rows and blank columns relative to this range. 1.7
range Method > showCard() Displays the card for an active cell if it has rich value content. 1.7
rangeFormat Property > textOrientation Gets or sets the text orientation of all the cells within the range. 1.7
rangeFormat Property > useStandardHeight Determines if the row height of the Range object equals the standard height of the sheet. 1.7
rangeFormat Property > useStandardWidth Determines if the columnwidth of the Range object equals the standard width of the sheet. 1.7
rangeHyperlink Property > address Represents the url target for the hyperlink. 1.7
rangeHyperlink Property > document.. Represents the document .. target for the hyperlink. 1.7
rangeHyperlink Property > screenTip Represents the string displayed when hovering over the hyperlink. 1.7
rangeHyperlink Property > textToDisplay Represents the string that is displayed in the top left most cell in the range. 1.7
style Property > addIndent Indicates if text is automatically indented when the text alignment in a cell is set to equal distribution. 1.7
style Property > autoIndent Indicates if text is automatically indented when the text alignment in a cell is set to equal distribution. 1.7
style Property > builtIn Indicates if the style is a built-in style. Read-only. 1.7
style Property > formulaHidden Indicates if the formula will be hidden when the worksheet is protected. 1.7
style Property > horizontalAlignment Represents the horizontal alignment for the style. Possible values are: General, Left, Center, Right, Fill, Justify, CenterAcrossSelection, Distributed. 1.7
style Property > includeAlignment Indicates if the style includes the AutoIndent, HorizontalAlignment, VerticalAlignment, WrapText, IndentLevel, and TextOrientation properties. 1.7
style Property > includeBorder Indicates if the style includes the Color, ColorIndex, LineStyle, and Weight border properties. 1.7
style Property > includeFont Indicates if the style includes the Background, Bold, Color, ColorIndex, FontStyle, Italic, Name, Size, Strikethrough, Subscript, Superscript, and Underline font properties. 1.7
style Property > includeNumber Indicates if the style includes the NumberFormat property. 1.7
style Property > includePatterns Indicates if the style includes the Color, ColorIndex, InvertIfNegative, Pattern, PatternColor, and PatternColorIndex interior properties. 1.7
style Property > includeProtection Indicates if the style includes the FormulaHidden and Locked protection properties. 1.7
style Property > indentLevel An integer from 0 to 250 that indicates the indent level for the style. 1.7
style Property > locked Indicates if the object is locked when the worksheet is protected. 1.7
style Property > name The name of the style. Read-only. 1.7
style Property > numberFormat The format code of the number format for the style. 1.7
style Property > numberFormatLocal The localized format code of the number format for the style. 1.7
style Property > orientation The text orientation for the style. 1.7
style Property > readingOrder The reading order for the style. Possible values are: Context, LeftToRight, RightToLeft. 1.7
style Property > shrinkToFit Indicates if text automatically shrinks to fit in the available column width. 1.7
style Property > textOrientation The text orientation for the style. 1.7
style Property > verticalAlignment Represents the vertical alignment for the style. Possible values are: Top, Center, Bottom, Justify, Distributed. 1.7
style Property > wrapText Indicates if Microsoft Excel wraps the text in the object. 1.7
style Relationship > borders A Border collection of four Border objects that represent the style of the four borders. Read-only. 1.7
style Relationship > fill The Fill of the style. Read-only. 1.7
style Relationship > font A Font object that represents the font of the style. Read-only. 1.7
style Method > delete() Deletes this style. 1.7
styleCollection Property > items A collection of style objects. Read-only. 1.7
styleCollection Method > add(name: string)] Adds a new style to the collection. 1.7
styleCollection Method > getItem(name: string) Gets a style by name. 1.7
tableChangedEventArgs Property > address Gets the address that represents the changed area of a table on a specific worksheet. 1.7
tableChangedEventArgs Property > changeType Gets the change type that represents how the Changed event is triggered. Possible values are: Others, RangeEdited, RowInserted, RowDeleted, ColumnInserted, ColumnDeleted, CellInserted, CellDeleted. 1.7
tableChangedEventArgs Property > source Gets the source of the event. Possible values are: Local, Remote. 1.7
tableChangedEventArgs Property > tableId Gets the id of the table in which the data changed. 1.7
tableChangedEventArgs Property > type Gets the type of the event. Possible values are: WorksheetDataChanged, WorksheetSelectionChanged, WorksheetAdded, WorksheetActivated, WorksheetDeactivated, TableDataChanged, TableSelectionChanged, WorksheetDeleted. 1.7
tableChangedEventArgs Property > worksheetId Gets the id of the worksheet in which the data changed. 1.7
tableSelectionChangedEventArgs Property > address Gets the range address that represents the selected area of the table on a specific worksheet. 1.7
tableSelectionChangedEventArgs Property > isInsideTable Indicates if the selection is inside a table, address will be useless if IsInsideTable is false. 1.7
tableSelectionChangedEventArgs Property > tableId Gets the id of the table in which the selection changed. 1.7
tableSelectionChangedEventArgs Property > type Gets the type of the event. Possible values are: WorksheetDataChanged, WorksheetSelectionChanged, WorksheetAdded, WorksheetActivated, WorksheetDeactivated, TableDataChanged, TableSelectionChanged, WorksheetDeleted. 1.7
tableSelectionChangedEventArgs Property > worksheetId Gets the id of the worksheet in which the selection changed. 1.7
workbook Property > name Gets the workbook name. Read-only. 1.7
workbook Relationship > dataConnections Refreshes all data connections in the workbook. Read-only. 1.7
workbook Relationship > properties Gets the workbook properties. Read-only. 1.7
workbook Relationship > protection Returns workbook protection object for a workbook. Read-only. 1.7
workbook Relationship > styles Represents a collection of styles associated with the workbook. Read-only. 1.7
workbook Method > getActiveCell() Gets the currently active cell from the workbook. 1.7
workbookProtection Property > protected Indicates if the workbook is protected. Read-Only. Read-only. 1.7
workbookProtection Method > protect(password: string) Protects a workbook. Fails if the workbook has been protected. 1.7
workbookProtection Method > unprotect(password: string) Unprotects a workbook. 1.7
worksheet Property > gridlines Gets or sets the worksheet's gridlines flag. 1.7
worksheet Property > headings Gets or sets the worksheet's headings flag. 1.7
worksheet Property > showHeadings Gets or sets the worksheet's headings flag. 1.7
worksheet Property > standardHeight Returns the standard (default) height of all the rows in the worksheet, in points. Read-only. 1.7
worksheet Property > standardWidth Returns or sets the standard (default) width of all the columns in the worksheet. 1.7
worksheet Property > tabColor Gets or sets the worksheet tab color. 1.7
worksheet Relationship > freezePanes Gets an object that can be used to manipulate frozen panes on the worksheet Read-only. 1.7
worksheet Method > copy(positionType: WorksheetPositionType, relativeTo: Worksheet) Copy a worksheet and place it at the specified position. Return the copied worksheet. 1.7
worksheet Method > getRangeByIndexes(startRow: number, startColumn: number, rowCount: number, columnCount: number) Gets the range object beginning at a particular row index and column index, and spanning a certain number of rows and columns. 1.7
worksheetActivatedEventArgs Property > type Gets the type of the event. Possible values are: WorksheetDataChanged, WorksheetSelectionChanged, WorksheetAdded, WorksheetActivated, WorksheetDeactivated, TableDataChanged, TableSelectionChanged, WorksheetDeleted. 1.7
worksheetActivatedEventArgs Property > worksheetId Gets the id of the worksheet that is activated. 1.7
worksheetAddedEventArgs Property > source Gets the source of the event. Possible values are: Local, Remote. 1.7
worksheetAddedEventArgs Property > type Gets the type of the event. Possible values are: WorksheetDataChanged, WorksheetSelectionChanged, WorksheetAdded, WorksheetActivated, WorksheetDeactivated, TableDataChanged, TableSelectionChanged, WorksheetDeleted. 1.7
worksheetAddedEventArgs Property > worksheetId Gets the id of the worksheet that is added to the workbook. 1.7
worksheetChangedEventArgs Property > address Gets the range address that represents the changed area of a specific worksheet. 1.7
worksheetChangedEventArgs Property > changeType Gets the change type that represents how the Changed event is triggered. Possible values are: Others, RangeEdited, RowInserted, RowDeleted, ColumnInserted, ColumnDeleted, CellInserted, CellDeleted. 1.7
worksheetChangedEventArgs Property > source Gets the source of the event. Possible values are: Local, Remote. 1.7
worksheetChangedEventArgs Property > type Gets the type of the event. Possible values are: WorksheetDataChanged, WorksheetSelectionChanged, WorksheetAdded, WorksheetActivated, WorksheetDeactivated, TableDataChanged, TableSelectionChanged, WorksheetDeleted. 1.7
worksheetChangedEventArgs Property > worksheetId Gets the id of the worksheet in which the data changed. 1.7
worksheetDeactivatedEventArgs Property > type Gets the type of the event. Possible values are: WorksheetDataChanged, WorksheetSelectionChanged, WorksheetAdded, WorksheetActivated, WorksheetDeactivated, TableDataChanged, TableSelectionChanged, WorksheetDeleted. 1.7
worksheetDeactivatedEventArgs Property > worksheetId Gets the id of the worksheet that is deactivated. 1.7
worksheetDeletedEventArgs Property > source Gets the source of the event. Possible values are: Local, Remote. 1.7
worksheetDeletedEventArgs Property > type Gets the type of the event. Possible values are: WorksheetDataChanged, WorksheetSelectionChanged, WorksheetAdded, WorksheetActivated, WorksheetDeactivated, TableDataChanged, TableSelectionChanged, WorksheetDeleted. 1.7
worksheetDeletedEventArgs Property > worksheetId Gets the id of the worksheet that is deleted from the workbook. 1.7
worksheetFreezePanes Method > freezeAt(frozenRange: Range or string) Sets the frozen cells in the active worksheet view. 1.7
worksheetFreezePanes Method > freezeColumns(count: number) Freeze the first column(s) of the worksheet in place. 1.7
worksheetFreezePanes Method > freezeRows(count: number) Freeze the top row(s) of the worksheet in place. 1.7
worksheetFreezePanes Method > getLocation() Gets a range that describes the frozen cells in the active worksheet view. 1.7
worksheetFreezePanes Method > getLocationOrNullObject() Gets a range that describes the frozen cells in the active worksheet view. 1.7
worksheetFreezePanes Method > unfreeze() Removes all frozen panes in the worksheet. 1.7
worksheetProtectionOptions Property > allowEditObjects Represents the worksheet protection option of allowing editing objects. 1.7
worksheetProtectionOptions Property > allowEditScenarios Represents the worksheet protection option of allowing editing scenarios. 1.7
worksheetProtectionOptions Relationship > selectionMode Represents the worksheet protection option of selection mode. 1.7
worksheetSelectionChangedEventArgs Property > address Gets the range address that represents the selected area of a specific worksheet. 1.7
worksheetSelectionChangedEventArgs Property > type Gets the type of the event. Possible values are: WorksheetDataChanged, WorksheetSelectionChanged, WorksheetAdded, WorksheetActivated, WorksheetDeactivated, TableDataChanged, TableSelectionChanged, WorksheetDeleted. 1.7
worksheetSelectionChangedEventArgs Property > worksheetId Gets the id of the worksheet in which the selection changed. 1.7

What's new in Excel JavaScript API 1.6

Conditional formatting

Introduces conditional formating of a range. Allows the following types of conditional formatting:

  • Color scale
  • Data bar
  • Icon set
  • Custom

In addition:

  • Returns the range the conditional format is applied to.
  • Removal of conditional formatting.
  • Provides priority and stopifTrue capability.
  • Get collection of all conditional formatting on a given range.
  • Clears all conditional formats active on the current specified range.
Object What is new Description Requirement set
application Method > suspendApiCalculationUntilNextSync() Suspends calculation until the next "context.sync()" is called. Once set, it is the developer's responsibility to re-calc the workbook, to ensure that any dependencies are propagated. 1.6
cellValueConditionalFormat Relationship > format Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. 1.6
cellValueConditionalFormat Relationship > rule Represents the Rule object on this conditional format. 1.6
colorScaleConditionalFormat Property > threeColorScale If true the color scale will have three points (minimum, midpoint, maximum), otherwise it will have two (minimum, maximum). Read-only. 1.6
colorScaleConditionalFormat Relationship > criteria The criteria of the color scale. Midpoint is optional when using a two point color scale. 1.6
conditionalCellValueRule Property > formula1 The formula, if required, to evaluate the conditional format rule on. 1.6
conditionalCellValueRule Property > formula2 The formula, if required, to evaluate the conditional format rule on. 1.6
conditionalCellValueRule Property > operator The operator of the text conditional format. Possible values are: Invalid, Between, NotBetween, EqualTo, NotEqualTo, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual. 1.6
conditionalColorScaleCriteria Relationship > maximum The maximum point Color Scale Criterion. 1.6
conditionalColorScaleCriteria Relationship > midpoint The midpoint Color Scale Criterion if the color scale is a 3-color scale. 1.6
conditionalColorScaleCriteria Relationship > minimum The minimum point Color Scale Criterion. 1.6
conditionalColorScaleCriterion Property > color HTML color code representation of the color scale color. E.g. #FF0000 represents Red. 1.6
conditionalColorScaleCriterion Property > formula A number, a formula, or null (if Type is LowestValue). 1.6
conditionalColorScaleCriterion Property > type What the icon conditional formula should be based on. Possible values are: Invalid, LowestValue, HighestValue, Number, Percent, Formula, Percentile. 1.6
conditionalDataBarNegativeFormat Property > borderColor HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). 1.6
conditionalDataBarNegativeFormat Property > fillColor HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). 1.6
conditionalDataBarNegativeFormat Property > matchPositiveBorderColor Boolean representation of whether or not the negative DataBar has the same border color as the positive DataBar. 1.6
conditionalDataBarNegativeFormat Property > matchPositiveFillColor Boolean representation of whether or not the negative DataBar has the same fill color as the positive DataBar. 1.6
conditionalDataBarPositiveFormat Property > borderColor HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). 1.6
conditionalDataBarPositiveFormat Property > fillColor HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). 1.6
conditionalDataBarPositiveFormat Property > gradientFill Boolean representation of whether or not the DataBar has a gradient. 1.6
conditionalDataBarRule Property > formula The formula, if required, to evaluate the databar rule on. 1.6
conditionalDataBarRule Property > type The type of rule for the databar. Possible values are: LowestValue, HighestValue, Number, Percent, Formula, Percentile, Automatic. 1.6
conditionalFormat Property > id The Priority of the Conditional Format within the current ConditionalFormatCollection. Read-only. 1.6
conditionalFormat Property > priority The priority (or index) within the conditional format collection that this conditional format currently exists in. Changing this also 1.6
conditionalFormat Property > stopIfTrue If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. 1.6
conditionalFormat Property > type A type of conditional format. Only one can be set at a time. Read-Only. Read-only. Possible values are: Custom, DataBar, ColorScale, IconSet. 1.6
conditionalFormat Relationship > cellValue Returns the cell value conditional format properties if the current conditional format is a CellValue type. Read-only. 1.6
conditionalFormat Relationship > cellValueOrNullObject Returns the cell value conditional format properties if the current conditional format is a CellValue type. Read-only. 1.6
conditionalFormat Relationship > colorScale Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. Read-only. 1.6
conditionalFormat Relationship > colorScaleOrNullObject Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. Read-only. 1.6
conditionalFormat Relationship > custom Returns the custom conditional format properties if the current conditional format is a custom type. Read-only. 1.6
conditionalFormat Relationship > customOrNullObject Returns the custom conditional format properties if the current conditional format is a custom type. Read-only. 1.6
conditionalFormat Relationship > dataBar Returns the data bar properties if the current conditional format is a data bar. Read-only. 1.6
conditionalFormat Relationship > dataBarOrNullObject Returns the data bar properties if the current conditional format is a data bar. Read-only. 1.6
conditionalFormat Relationship > iconSet Returns the IconSet conditional format properties if the current conditional format is an IconSet type. Read-only. 1.6
conditionalFormat Relationship > iconSetOrNullObject Returns the IconSet conditional format properties if the current conditional format is an IconSet type. Read-only. 1.6
conditionalFormat Relationship > preset Returns the preset criteria conditional format such as above averagebelow averageunique valuescontains blanknonblankerrornoerror properties. Read-only. 1.6
conditionalFormat Relationship > presetOrNullObject Returns the preset criteria conditional format such as above averagebelow averageunique valuescontains blanknonblankerrornoerror properties. Read-only. 1.6
conditionalFormat Relationship > textComparison Returns the specific text conditional format properties if the current conditional format is a text type. Read-only. 1.6
conditionalFormat Relationship > textComparisonOrNullObject Returns the specific text conditional format properties if the current conditional format is a text type. Read-only. 1.6
conditionalFormat Relationship > topBottom Returns the TopBottom conditional format properties if the current conditional format is an TopBottom type. Read-only. 1.6
conditionalFormat Relationship > topBottomOrNullObject Returns the TopBottom conditional format properties if the current conditional format is an TopBottom type. Read-only. 1.6
conditionalFormat Method > delete() Deletes this conditional format. 1.6
conditionalFormat Method > getRange() Returns the range the conditonal format is applied to or a null object if the range is discontiguous. Read-only. 1.6
conditionalFormat Method > getRangeOrNullObject() Returns the range the conditonal format is applied to or a null object if the range is discontiguous. Read-only. 1.6
conditionalFormatCollection Property > items A collection of conditionalFormat objects. Read-only. 1.6
conditionalFormatCollection Method > add(type: string) Adds a new conditional format to the collection at the firsttop priority. 1.6
conditionalFormatCollection Method > clearAll() Clears all conditional formats active on the current specified range. 1.6
conditionalFormatCollection Method > getCount() Returns the number of conditional formats in the workbook. Read-only. 1.6
conditionalFormatCollection Method > getItem(id: string) Returns a conditional format for the given ID. 1.6
conditionalFormatCollection Method > getItemAt(index: number) Returns a conditional format at the given index. 1.6
conditionalFormatRule Property > formula The formula, if required, to evaluate the conditional format rule on. 1.6
conditionalFormatRule Property > formulaLocal The formula, if required, to evaluate the conditional format rule on in the user's language. 1.6
conditionalFormatRule Property > formulaR1C1 The formula, if required, to evaluate the conditional format rule on in R1C1-style notation. 1.6
conditionalIconCriterion Property > formula A number or a formula depending on the type. 1.6
conditionalIconCriterion Property > operator GreaterThan or GreaterThanOrEqual for each of the rule type for the Icon conditional format. Possible values are: Invalid, GreaterThan, GreaterThanOrEqual. 1.6
conditionalIconCriterion Relationship > customIcon The custom icon for the current criterion if different from the default IconSet, else null will be returned. 1.6
conditionalIconCriterion Relationship > type What the icon conditional formula should be based on. 1.6
conditionalPresetCriteriaRule Property > criterion The criterion of the conditional format. Possible values are: Invalid, Blanks, NonBlanks, Errors, NonErrors, Yesterday, Today, Tomorrow, LastSevenDays, LastWeek, ThisWeek, NextWeek, LastMonth, ThisMonth, NextMonth, AboveAverage, BelowAverage, EqualOrAboveAverage, EqualOrBelowAverage, OneStdDevAboveAverage, OneStdDevBelowAverage, TwoStdDevAboveAverage, TwoStdDevBelowAverage, ThreeStdDevAboveAverage, ThreeStdDevBelowAverage, UniqueValues, DuplicateValues. 1.6
conditionalRangeBorder Property > color HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). 1.6
conditionalRangeBorder Property > id Represents border identifier. Read-only. Possible values are: EdgeTop, EdgeBottom, EdgeLeft, EdgeRight. 1.6
conditionalRangeBorder Property > sideIndex Constant value that indicates the specific side of the border. Read-only. Possible values are: EdgeTop, EdgeBottom, EdgeLeft, EdgeRight. 1.6
conditionalRangeBorder Property > style One of the constants of line style specifying the line style for the border. Possible values are: None, Continuous, Dash, DashDot, DashDotDot, Dot, Double, SlantDashDot. 1.6
conditionalRangeBorderCollection Property > count Number of border objects in the collection. Read-only. 1.6
conditionalRangeBorderCollection Property > items A collection of conditionalRangeBorder objects. Read-only. 1.6
conditionalRangeBorderCollection Relationship > bottom Gets the top border Read-only. 1.6
conditionalRangeBorderCollection Relationship > left Gets the top border Read-only. 1.6
conditionalRangeBorderCollection Relationship > right Gets the top border Read-only. 1.6
conditionalRangeBorderCollection Relationship > top Gets the top border Read-only. 1.6
conditionalRangeBorderCollection Method > getItem(index: string) Gets a border object using its name 1.6
conditionalRangeBorderCollection Method > getItemAt(index: number) Gets a border object using its index 1.6
conditionalRangeFill Property > color HTML color code representing the color of the fill, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). 1.6
conditionalRangeFill Method > clear() Resets the fill. 1.6
conditionalRangeFont Property > bold Represents the bold status of font. 1.6
conditionalRangeFont Property > color HTML color code representation of the text color. E.g. #FF0000 represents Red. 1.6
conditionalRangeFont Property > italic Represents the italic status of the font. 1.6
conditionalRangeFont Property > strikethrough Represents the strikethrough status of the font. 1.6
conditionalRangeFont Property > underline Type of underline applied to the font. Possible values are: None, Single, Double. 1.6
conditionalRangeFont Method > clear() Resets the font formats. 1.6
conditionalRangeFormat Property > numberFormat Represents Excel's number format code for the given range. Cleared if null is passed in. 1.6
conditionalRangeFormat Relationship > borders Collection of border objects that apply to the overall conditional format range. Read-only. 1.6
conditionalRangeFormat Relationship > fill Returns the fill object defined on the overall conditional format range. Read-only. 1.6
conditionalRangeFormat Relationship > font Returns the font object defined on the overall conditional format range. Read-only. 1.6
conditionalTextComparisonRule Property > operator The operator of the text conditional format. Possible values are: Invalid, Contains, NotContains, BeginsWith, EndsWith. 1.6
conditionalTextComparisonRule Property > text The Text value of conditional format. 1.6
conditionalTopBottomRule Property > rank The rank between 1 and 1000 for numeric ranks or 1 and 100 for percent ranks. 1.6
conditionalTopBottomRule Property > type Format values based on the top or bottom rank. Possible values are: Invalid, TopItems, TopPercent, BottomItems, BottomPercent. 1.6
customConditionalFormat Relationship > format Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. 1.6
customConditionalFormat Relationship > rule Represents the Rule object on this conditional format. Read-only. 1.6
dataBarConditionalFormat Property > axisColor HTML color code representing the color of the Axis line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). 1.6
dataBarConditionalFormat Property > axisFormat Representation of how the axis is determined for an Excel data bar. Possible values are: Automatic, None, CellMidPoint. 1.6
dataBarConditionalFormat Property > barDirection Represents the direction that the data bar graphic should be based on. Possible values are: Context, LeftToRight, RightToLeft. 1.6
dataBarConditionalFormat Property > showDataBarOnly If true, hides the values from the cells where the data bar is applied. 1.6
dataBarConditionalFormat Relationship > lowerBoundRule The rule for what consistutes the lower bound (and how to calculate it, if applicable) for a data bar. 1.6
dataBarConditionalFormat Relationship > negativeFormat Representation of all values to the left of the axis in an Excel data bar. Read-only. 1.6
dataBarConditionalFormat Relationship > positiveFormat Representation of all values to the right of the axis in an Excel data bar. Read-only. 1.6
dataBarConditionalFormat Relationship > upperBoundRule The rule for what constitutes the upper bound (and how to calculate it, if applicable) for a data bar. 1.6
iconSetConditionalFormat Property > reverseIconOrder If true, reverses the icon orders for the IconSet. Note that this cannot be set if custom icons are used. 1.6
iconSetConditionalFormat Property > showIconOnly If true, hides the values and only shows icons. 1.6
iconSetConditionalFormat Property > style If set, displays the IconSet option for the conditional format. Possible values are: Invalid, ThreeArrows, ThreeArrowsGray, ThreeFlags, ThreeTrafficLights1, ThreeTrafficLights2, ThreeSigns, ThreeSymbols, ThreeSymbols2, FourArrows, FourArrowsGray, FourRedToBlack, FourRating, FourTrafficLights, FiveArrows, FiveArrowsGray, FiveRating, FiveQuarters, ThreeStars, ThreeTriangles, FiveBoxes. 1.6
iconSetConditionalFormat Relationship > criteria An array of Criteria and IconSets for the rules and potential custom icons for conditional icons. Note that for the first criterion only the custom icon can be modified, while type, formula and operator will be ignored when set. 1.6
presetCriteriaConditionalFormat Relationship > format Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. 1.6
presetCriteriaConditionalFormat Relationship > rule The rule of the conditional format. 1.6
range Relationship > conditionalFormats Collection of ConditionalFormats that intersect the range. Read-only. 1.6
range Method > calculate() Calculates a range of cells on a worksheet. 1.6
textConditionalFormat Relationship > format Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. 1.6
textConditionalFormat Relationship > rule The rule of the conditional format. 1.6
topBottomConditionalFormat Relationship > format Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. 1.6
topBottomConditionalFormat Relationship > rule The criteria of the TopBottom conditional format. 1.6
workbook Relationship > internalTest For internal use only. Read-only. 1.6
worksheet Method > calculate(markAllDirty: bool) Calculates all cells on a worksheet. 1.6

What's new in Excel JavaScript API 1.5

Custom XML part

  • Addition of custom XML parts collection to workbook object.
  • Get custom XML part using ID
  • Get a new scoped collection of custom XML parts whose namespaces match the given namespace.
  • Get XML string associated with a part.
  • Provide id and namespace of a part.
  • Adds a new custom XML part to the workbook.
  • Set entire XML part.
  • Delete a custom XML part.
  • Delete an attribute with the given name from the element identified by xpath.
  • Query the XML content by xpath.
  • Insert, update and delete attribute.

Reference implementation: Please refer here for a reference implementation that shows how custom XML parts can be used in an add-in.

Others

  • range.getSurroundingRegion() Returns a Range object that represents the surrounding region for this range. A surrounding region is a range bounded by any combination of blank rows and blank columns relative to this range.
  • getNextColumn() and getPreviousColumn(), `getLast() on table column.
  • getActiveWorksheet() on the workbook.
  • getRange(address: string) off of workbook.
  • getBoundingRange(ranges: ) Gets the smallest range object that encompasses the provided ranges. For example, the bounding range between "B2:C5" and "D10:E15" is "B2:E15".
  • getCount() on various collections such as named item, worksheet, table, etc. to get number of items in a collection. workbook.worksheets.getCount()
  • getFirst() and getLast() and get last on various collection such as tworksheet, able column, chart points, range view collection.
  • getNext() and getPrevious() on worksheet, table column collection.
  • getRangeR1C1() Gets the range object beginning at a particular row index and column index, and spanning a certain number of rows and columns.
Object What is new Description Requirement set
customXmlPart Property > id The custom XML part's ID. Read-only. 1.5
customXmlPart Property > namespaceUri The custom XML part's namespace URI. Read-only. 1.5
customXmlPart Method > delete() Deletes the custom XML part. 1.5
customXmlPart Method > getXml() Gets the custom XML part's full XML content. 1.5
customXmlPart Method > setXml(xml: string) Sets the custom XML part's full XML content. 1.5
customXmlPartCollection Property > items A collection of customXmlPart objects. Read-only. 1.5
customXmlPartCollection Method > add(xml: string) Adds a new custom XML part to the workbook. 1.5
customXmlPartCollection Method > getByNamespace(namespaceUri: string) Gets a new scoped collection of custom XML parts whose namespaces match the given namespace. 1.5
customXmlPartCollection Method > getCount() Gets the number of CustomXml parts in the collection. 1.5
customXmlPartCollection Method > getItem(id: string) Gets a custom XML part based on its ID. 1.5
customXmlPartCollection Method > getItemOrNullObject(id: string) Gets a custom XML part based on its ID. 1.5
customXmlPartScopedCollection Property > items A collection of customXmlPartScoped objects. Read-only. 1.5
customXmlPartScopedCollection Method > getCount() Gets the number of CustomXML parts in this collection. 1.5
customXmlPartScopedCollection Method > getItem(id: string) Gets a custom XML part based on its ID. 1.5
customXmlPartScopedCollection Method > getItemOrNullObject(id: string) Gets a custom XML part based on its ID. 1.5
customXmlPartScopedCollection Method > getOnlyItem() If the collection contains exactly one item, this method returns it. 1.5
customXmlPartScopedCollection Method > getOnlyItemOrNullObject() If the collection contains exactly one item, this method returns it. 1.5
workbook Relationship > customXmlParts Represents the collection of custom XML parts contained by this workbook. Read-only. 1.5
worksheet Method > getNext(visibleOnly: bool) Gets the worksheet that follows this one. If there are no worksheets following this one, this method will throw an error. 1.5
worksheet Method > getNextOrNullObject(visibleOnly: bool) Gets the worksheet that follows this one. If there are no worksheets following this one, this method will return a null object. 1.5
worksheet Method > getPrevious(visibleOnly: bool) Gets the worksheet that precedes this one. If there are no previous worksheets, this method will throw an error. 1.5
worksheet Method > getPreviousOrNullObject(visibleOnly: bool) Gets the worksheet that precedes this one. If there are no previous worksheets, this method will return a null objet. 1.5
worksheetCollection Method > getFirst(visibleOnly: bool) Gets the first worksheet in the collection. 1.5
worksheetCollection Method > getLast(visibleOnly: bool) Gets the last worksheet in the collection. 1.5

What's new in Excel JavaScript API 1.4

The following are the new additions to the Excel JavaScript APIs in requirement set 1.4.

Named item add and new properties

New properties:

  • comment
  • scope worksheet or workbook scoped items
  • worksheet returns the worksheet on which the named item is scoped to.

New methods:

  • add(name: string, reference: Range or string, comment: string)Adds a new name to the collection of the given scope.
  • addFormulaLocal(name: string, formula: string, comment: string) Adds a new name to the collection of the given scope using the user's locale for the formula.

Settings API in the Excel namespace

The Setting object represents a key:value pair for a setting persisted to the document. The functionality of Excel.Setting is equivalent to Office.Settings, but uses the batched API syntax, rather than the Common API's callback model.

APIs include getItem() to get setting entry via the key, add() to add the specified key:value setting pair to the workbook.

Others

  • Set table column name (prior version only allows reading).

  • Add table column to the end of the table (prior version only allows anywhere but last).

  • Add multiple rows to a table at a time (prior version only allows 1 row at a time).

  • range.getColumnsAfter(count: number) and range.getColumnsBefore(count: number) to get a certain number of columns to the right/left of the current Range object.

  • Get item or null object function: This functionality allows getting object using a key. If the object does not exist, the returned object's isNullObject property will be true. This alows developers to check if an object exists or not without having to handle it thorugh exception handling. Available on worksheet, named-item, binding, chart series, etc.

    worksheet.GetItemOrNullObject()
    
Object What is new Description Requirement set
bindingCollection Method > getCount() Gets the number of bindings in the collection. 1.4
bindingCollection Method > getItemOrNullObject(id: string) Gets a binding object by ID. If the binding object does not exist, will return a null object. 1.4
chartCollection Method > getCount() Returns the number of charts in the worksheet. 1.4
chartCollection Method > getItemOrNullObject(name: string) Gets a chart using its name. If there are multiple charts with the same name, the first one will be returned. 1.4
chartPointsCollection Method > getCount() Returns the number of chart points in the series. 1.4
chartSeriesCollection Method > getCount() Returns the number of series in the collection. 1.4
namedItem Property > comment Represents the comment associated with this name. 1.4
namedItem Property > scope Indicates whether the name is scoped to the workbook or to a specific worksheet. Read-only. Possible values are: Equal, Greater, GreaterEqual, Less, LessEqual, NotEqual. 1.4
namedItem Relationship > worksheet Returns the worksheet on which the named item is scoped to. Throws an error if the items is scoped to the workbook instead. Read-only. 1.4
namedItem Relationship > worksheetOrNullObject Returns the worksheet on which the named item is scoped to. Returns a null object if the item is scoped to the workbook instead. Read-only. 1.4
namedItem Method > delete() Deletes the given name. 1.4
namedItem Method > getRangeOrNullObject() Returns the range object that is associated with the name. Returns a null object if the named item's type is not a range. 1.4
namedItemCollection Method > add(name: string, reference: Range or string, comment: string) Adds a new name to the collection of the given scope. 1.4
namedItemCollection Method > addFormulaLocal(name: string, formula: string, comment: string) Adds a new name to the collection of the given scope using the user's locale for the formula. 1.4
namedItemCollection Method > getCount() Gets the number of named items in the collection. 1.4
namedItemCollection Method > getItemOrNullObject(name: string) Gets a nameditem object using its name. If the nameditem object does not exist, will return a null object. 1.4
pivotTableCollection Method > getCount() Gets the number of pivot tables in the collection. 1.4
pivotTableCollection Method > getItemOrNullObject(name: string) Gets a PivotTable by name. If the PivotTable does not exist, will return a null object. 1.4
range Method > getIntersectionOrNullObject(anotherRange: Range or string) Gets the range object that represents the rectangular intersection of the given ranges. If no intersection is found, will return a null object. 1.4
range Method > getUsedRangeOrNullObject(valuesOnly: bool) Returns the used range of the given range object. If there are no used cells within the range, this function will return a null object. 1.4
rangeViewCollection Method > getCount() Gets the number of RangeView objects in the collection. 1.4
setting Property > key Returns the key that represents the id of the Setting. Read-only. 1.4
setting Property > value Represents the value stored for this setting. 1.4
setting Method > delete() Deletes the setting. 1.4
settingCollection Property > items A collection of setting objects. Read-only. 1.4
settingCollection Method > add(key: string, value: (any)) Sets or adds the specified setting to the workbook. 1.4
settingCollection Method > getCount() Gets the number of Settings in the collection. 1.4
settingCollection Method > getItem(key: string) Gets a Setting entry via the key. 1.4
settingCollection Method > getItemOrNullObject(key: string) Gets a Setting entry via the key. If the Setting does not exist, will return a null object. 1.4
settingsChangedEventArgs Relationship > settings Gets the Setting object that represents the binding that raised the SettingsChanged event 1.4
tableCollection Method > getCount()] Gets the number of tables in the collection. 1.4
tableCollection Method > getItemOrNullObject(key: number or string) Gets a table by Name or ID. If the table does not exist, will return a null object. 1.4
tableColumnCollection Method > getCount() Gets the number of columns in the table. 1.4
tableColumnCollection Method > getItemOrNullObject(key: number or string) Gets a column object by Name or ID. If the column does not exist, will return a null object. 1.4
tableRowCollection Method > getCount() Gets the number of rows in the table. 1.4
workbook Relationship > settings Represents a collection of Settings associated with the workbook. Read-only. 1.4
worksheet Relationship > names Collection of names scoped to the current worksheet. Read-only. 1.4
worksheet Method > getUsedRangeOrNullObject(valuesOnly: bool) The used range is the smallest range that encompasses any cells that have a value or formatting assigned to them. If the entire worksheet is blank, this function will return a null object. 1.4
worksheetCollection Method > getCount(visibleOnly: bool) Gets the number of worksheets in the collection. 1.4
worksheetCollection Method > getItemOrNullObject(key: string) Gets a worksheet object using its Name or ID. If the worksheet does not exist, will return a null object. 1.4

What's new in Excel JavaScript API 1.3

The following are the new additions to the Excel JavaScript APIs in requirement set 1.3.

Object What's new Description Requirement set
binding Method > delete() Deletes the binding. 1.3
bindingCollection Method > add(range: Range or string, bindingType: string, id: string) Add a new binding to a particular Range. 1.3
bindingCollection Method > addFromNamedItem(name: string, bindingType: string, id: string) Add a new binding based on a named item in the workbook. 1.3
bindingCollection Method > addFromSelection(bindingType: string, id: string) Add a new binding based on the current selection. 1.3
bindingCollection Method > getItemOrNull(id: string) Gets a binding object by ID. If the binding object does not exist, the return object's isNull property will be true. 1.3
chartCollection Method > getItemOrNull(name: string) Gets a chart using its name. If there are multiple charts with the same name, the first one will be returned. 1.3
namedItemCollection Method > getItemOrNull(name: string) Gets a nameditem object using its name. If the nameditem object does not exist, the returned object's isNull property will be true. 1.3
pivotTable Property > name Name of the PivotTable. 1.3
pivotTable Relationship > worksheet The worksheet containing the current PivotTable. Read-only. 1.3
pivotTable Method > refresh() Refreshes the PivotTable. 1.3
pivotTableCollection Property > items A collection of pivotTable objects. Read-only. 1.3
pivotTableCollection Method > getItem(name: string) Gets a PivotTable by name. 1.3
pivotTableCollection Method > getItemOrNull(name: string) Gets a PivotTable by name. If the PivotTable does not exist, the return object's isNull property will be true. 1.3
range Method > getIntersectionOrNull(anotherRange: Range or string) Gets the range object that represents the rectangular intersection of the given ranges. If no intersection is found, will return a null object. 1.3
range Method > getVisibleView() Represents the visible rows of the current range. 1.3
rangeView Property > cellAddresses Represents the cell addresses of the RangeView. Read-only. 1.3
rangeView Property > columnCount Returns the number of visible columns. Read-only. 1.3
rangeView Property > formulas Represents the formula in A1-style notation. 1.3
rangeView Property > formulasLocal Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, introduced in 1.5)" formula would become "=SUMME(A1; 1,5)" in German. 1.3
rangeView Property > formulasR1C1 Represents the formula in R1C1-style notation. 1.3
rangeView Property > index Returns a value that represents the index of the RangeView. Read-only. 1.3
rangeView Property > numberFormat Represents Excel's number format code for the given cell. 1.3
rangeView Property > rowCount Returns the number of visible rows. Read-only. 1.3
rangeView Property > text Text values of the specified range. The Text value will not depend on the cell width. The # sign substitution that happens in Excel UI will not affect the text value returned by the API. Read-only. 1.3
rangeView Property > valueTypes Represents the type of data of each cell. Read-only. Possible values are: Unknown, Empty, String, Integer, Double, Boolean, Error. 1.3
rangeView Property > values Represents the raw values of the specified range view. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string. 1.3
rangeView Relationship > rows Represents a collection of range views associated with the range. Read-only. 1.3
rangeView Method > getRange() Gets the parent range associated with the current RangeView. 1.3
rangeViewCollection Property > items A collection of rangeView objects. Read-only. 1.3
rangeViewCollection Method > getItemAt(index: number) Gets a RangeView Row via it's index. Zero-Indexed. 1.3
setting Property > key Returns the key that represents the id of the Setting. Read-only. 1.3
setting Method > delete() Deletes the setting. 1.3
settingCollection Property > items A collection of setting objects. Read-only. 1.3
settingCollection Method > getItem(key: string) Gets a Setting entry via the key. 1.3
settingCollection Method > getItemOrNull(key: string) Gets a Setting entry via the key. If the Setting does not exist, the returned object's isNull property will be true. 1.3
settingCollection Method > set(key: string, value: string) Sets or adds the specified setting to the workbook. 1.3
settingsChangedEventArgs Relationship > settingCollection Gets the Setting object that represents the binding that raised the SettingsChanged event 1.3
table Property > highlightFirstColumn Indicates whether the first column contains special formatting. 1.3
table Property > highlightLastColumn Indicates whether the last column contains special formatting. 1.3
table Property > showBandedColumns Indicates whether the columns show banded formatting in which odd columns are highlighted differently from even ones to make reading the table easier. 1.3
table Property > showBandedRows Indicates whether the rows show banded formatting in which odd rows are highlighted differently from even ones to make reading the table easier. 1.3
table Property > showFilterButton Indicates whether the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. 1.3
tableCollection Method > getItemOrNull(key: number or string) Gets a table by Name or ID. If the table does not exist, the return object's isNull property will be true. 1.3
tableColumnCollection Method > getItemOrNull(key: number or string) Gets a column object by Name or ID. If the column does not exist, the returned object's isNull property will be true. 1.3
workbook Relationship > pivotTables Represents a collection of PivotTables associated with the workbook. Read-only. 1.3
workbook Relationship > settings Represents a collection of Settings associated with the workbook. Read-only. 1.3
worksheet Relationship > pivotTables Collection of PivotTables that are part of the worksheet. Read-only. 1.3

What's new in Excel JavaScript API 1.2

The following are the new additions to the Excel JavaScript APIs in requirement set 1.2.

Object What's new Description Requirement set
chart Property > id Gets a chart based on its position in the collection. Read-only. 1.2
chart Relationship > worksheet The worksheet containing the current chart. Read-only. 1.2
chart Method > getImage(height: number, width: number, fittingMode: string) Renders the chart as a base64-encoded image by scaling the chart to fit the specified dimensions. 1.2
filter Relationship > criteria The currently applied filter on the given column. Read-only. 1.2
filter Method > apply(criteria: FilterCriteria) Apply the given filter criteria on the given column. 1.2
filter Method > applyBottomItemsFilter(count: number) Apply a "Bottom Item" filter to the column for the given number of elements. 1.2
filter Method > applyBottomPercentFilter(percent: number)] Apply a "Bottom Percent" filter to the column for the given percentage of elements. 1.2
filter Method > applyCellColorFilter(color: string) Apply a "Cell Color" filter to the column for the given color. 1.2
filter Method > applyCustomFilter(criteria1: string, criteria2: string, oper: string) Apply a "Icon" filter to the column for the given criteria strings. 1.2
filter Method > applyDynamicFilter(criteria: string) Apply a "Dynamic" filter to the column. 1.2
filter Method > applyFontColorFilter(color: string) Apply a "Font Color" filter to the column for the given color. 1.2
filter Method > applyIconFilter(icon: Icon) Apply a "Icon" filter to the column for the given icon. 1.2
filter Method > applyTopItemsFilter(count: number) Apply a "Top Item" filter to the column for the given number of elements. 1.2
filter Method > applyTopPercentFilter(percent: number) Apply a "Top Percent" filter to the column for the given percentage of elements. 1.2
filter Method > applyValuesFilter(values: ()) Apply a "Values" filter to the column for the given values. 1.2
filter Method > clear() Clear the filter on the given column. 1.2
filterCriteria Property > color The HTML color string used to filter cells. Used with "cellColor" and "fontColor" filtering. 1.2
filterCriteria Property > criterion1 The first criterion used to filter data. Used as an operator in the case of "custom" filtering. 1.2
filterCriteria Property > criterion2 The second criterion used to filter data. Only used as an operator in the case of "custom" filtering. 1.2
filterCriteria Property > dynamicCriteria The dynamic criteria from the Excel.DynamicFilterCriteria set to apply on this column. Used with "dynamic" filtering. Possible values are: Unknown, AboveAverage, AllDatesInPeriodApril, AllDatesInPeriodAugust, AllDatesInPeriodDecember, AllDatesInPeriodFebruray, AllDatesInPeriodJanuary, AllDatesInPeriodJuly, AllDatesInPeriodJune, AllDatesInPeriodMarch, AllDatesInPeriodMay, AllDatesInPeriodNovember, AllDatesInPeriodOctober, AllDatesInPeriodQuarter1, AllDatesInPeriodQuarter2, AllDatesInPeriodQuarter3, AllDatesInPeriodQuarter4, AllDatesInPeriodSeptember, BelowAverage, LastMonth, LastQuarter, LastWeek, LastYear, NextMonth, NextQuarter, NextWeek, NextYear, ThisMonth, ThisQuarter, ThisWeek, ThisYear, Today, Tomorrow, YearToDate, Yesterday. 1.2
filterCriteria Property > filterOn The property used by the filter to determine whether the values should stay visible. Possible values are: BottomItems, BottomPercent, CellColor, Dynamic, FontColor, Values, TopItems, TopPercent, Icon, Custom. 1.2
filterCriteria Property > operator The operator used to combine criterion 1 and 2 when using "custom" filtering. Possible values are: And, Or. 1.2
filterCriteria Property > values The set of values to be used as part of "values" filtering. 1.2
filterCriteria Relationship > icon The icon used to filter cells. Used with "icon" filtering. 1.2
filterDatetime Property > date The date in ISO8601 format used to filter data. 1.2
filterDatetime Property > specificity How specific the date should be used to keep data. For example, if the date is 2005-04-02 and the specifity is set to "month", the filter operation will keep all rows with a date in the month of april 2009. Possible values are: Year, Monday, Day, Hour, Minute, Second. 1.2
formatProtection Property > formulaHidden Indicates if Excel hides the formula for the cells in the range. A null value indicates that the entire range doesn't have uniform formula hidden setting. 1.2
formatProtection Property > locked Indicates if Excel locks the cells in the object. A null value indicates that the entire range doesn't have uniform lock setting. 1.2
icon Property > index Represents the index of the icon in the given set. 1.2
icon Property > set Represents the set that the icon is part of. Possible values are: Invalid, ThreeArrows, ThreeArrowsGray, ThreeFlags, ThreeTrafficLights1, ThreeTrafficLights2, ThreeSigns, ThreeSymbols, ThreeSymbols2, FourArrows, FourArrowsGray, FourRedToBlack, FourRating, FourTrafficLights, FiveArrows, FiveArrowsGray, FiveRating, FiveQuarters, ThreeStars, ThreeTriangles, FiveBoxes. 1.2
range Property > columnHidden Represents if all columns of the current range are hidden. 1.2
range Property > formulasR1C1 Represents the formula in R1C1-style notation. 1.2
range Property > hidden Represents if all cells of the current range are hidden. Read-only. 1.2
range Property > rowHidden Represents if all rows of the current range are hidden. 1.2
range Relationship > sort Represents the range sort of the current range. Read-only. 1.2
range Method > merge(across: bool) Merge the range cells into one region in the worksheet. 1.2
range Method > unmerge() Unmerge the range cells into separate cells. 1.2
rangeFormat Property > columnWidth Gets or sets the width of all colums within the range. If the column widths are not uniform, null will be returned. 1.2
rangeFormat Property > rowHeight Gets or sets the height of all rows in the range. If the row heights are not uniform null will be returned. 1.2
rangeFormat Relationship > protection Returns the format protection object for a range. Read-only. 1.2
rangeFormat Method > autofitColumns() Changes the width of the columns of the current range to achieve the best fit, based on the current data in the columns. 1.2
rangeFormat Method > autofitRows() Changes the height of the rows of the current range to achieve the best fit, based on the current data in the columns. 1.2
rangeReference Property > address Represents the visible rows of the current range. 1.2
rangeSort Method > apply(fields: SortField, matchCase: bool, hasHeaders: bool, orientation: string, method: string) Perform a sort operation. 1.2
sortField Property > ascending Represents whether the sorting is done in an ascending fashion. 1.2
sortField Property > color Represents the color that is the target of the condition if the sorting is on font or cell color. 1.2
sortField Property > dataOption Represents additional sorting options for this field. Possible values are: Normal, TextAsNumber. 1.2
sortField Property > key Represents the column (or row, depending on the sort orientation) that the condition is on. Represented as an offset from the first column (or row). 1.2
sortField Property > sortOn Represents the type of sorting of this condition. Possible values are: Value, CellColor, FontColor, Icon. 1.2
sortField Relationship > icon Represents the icon that is the target of the condition if the sorting is on the cell's icon. 1.2
table Relationship > sort Represents the sorting for the table. Read-only. 1.2
table Relationship > worksheet The worksheet containing the current table. Read-only. 1.2
table Method > clearFilters() Clears all the filters currently applied on the table. 1.2
table Method > convertToRange() Converts the table into a normal range of cells. All data is preserved. 1.2
table Method > reapplyFilters() Reapplies all the filters currently on the table. 1.2
tableColumn Relationship > filter Retrieve the filter applied to the column. Read-only. 1.2
tableSort Property > matchCase Represents whether the casing impacted the last sort of the table. Read-only. 1.2
tableSort Property > method Represents Chinese character ordering method last used to sort the table. Read-only. Possible values are: PinYin, StrokeCount. 1.2
tableSort Relationship > fields Represents the current conditions used to last sort the table. Read-only. 1.2
tableSort Method > apply(fields: SortField, matchCase: bool, method: string) Perform a sort operation. 1.2
tableSort Method > clear() Clears the sorting that is currently on the table. While this doesn't modify the table's ordering, it clears the state of the header buttons. 1.2
tableSort Method > reapply() Reapplies the current sorting parameters to the table. 1.2
workbook Relationship > functions Represents Excel application instance that contains this workbook. Read-only. 1.2
worksheet Relationship > protection Returns sheet protection object for a worksheet. Read-only. 1.2
worksheetProtection Property > protected Indicates if the worksheet is protected. Read-Only. Read-only. 1.2
worksheetProtection Relationship > options Sheet protection options. Read-only. 1.2
worksheetProtection Method > protect(options: WorksheetProtectionOptions) Protects a worksheet. Fails if the worksheet has been protected. 1.2
worksheetProtection Method > unprotect() Unprotects a worksheet. 1.2
worksheetProtectionOptions Property > allowAutoFilter Represents the worksheet protection option of allowing using auto filter feature. 1.2
worksheetProtectionOptions Property > allowDeleteColumns Represents the worksheet protection option of allowing deleting columns. 1.2
worksheetProtectionOptions Property > allowDeleteRows Represents the worksheet protection option of allowing deleting rows. 1.2
worksheetProtectionOptions Property > allowFormatCells Represents the worksheet protection option of allowing formatting cells. 1.2
worksheetProtectionOptions Property > allowFormatColumns Represents the worksheet protection option of allowing formatting columns. 1.2
worksheetProtectionOptions Property > allowFormatRows Represents the worksheet protection option of allowing formatting rows. 1.2
worksheetProtectionOptions Property > allowInsertColumns Represents the worksheet protection option of allowing inserting columns. 1.2
worksheetProtectionOptions Property > allowInsertHyperlinks Represents the worksheet protection option of allowing inserting hyperlinks. 1.2
worksheetProtectionOptions Property > allowInsertRows Represents the worksheet protection option of allowing inserting rows. 1.2
worksheetProtectionOptions Property > allowPivotTables Represents the worksheet protection option of allowing using PivotTable feature. 1.2
worksheetProtectionOptions Property > allowSort Represents the worksheet protection option of allowing using sort feature. 1.2

Excel JavaScript API 1.1

Excel JavaScript API 1.1 is the first version of the API. For details about the API, see the Excel JavaScript API reference topics.

See also