Excel JavaScript API 要求集Excel JavaScript API requirement sets

要求集是指各组已命名的 API 成员。Office 加载项使用清单中指定的要求集或执行运行时检查,以确定 Office 主机是否支持加载项所需的 API。有关详细信息,请参阅 Office 版本和要求集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 加载项跨多个版本 Office 运行,包括 Windows 版 Office 2016 或更高版本、Office 网页版、Mac 版 Office 和 iPad 版 Office。下表列出了 Excel 要求集、支持各个要求集的 Office 主机应用程序,以及这些应用程序的内部版本或生成号。Excel add-ins run across multiple versions of Office, including Office 2016 or later on Windows, Office for iPad, Office for Mac, and Office Online. 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.

备注

若要在任何编号的要求集中使用 API,你应该引用 CDN 上的生产库:https://appsforoffice.microsoft.com/lib/1/hosted/office.js。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.

有关使用预览 API 的信息,请参阅本文的 Excel JavaScript 预览 API 部分。For information about using preview APIs, see the Excel JavaScript preview APIs section within this article.

要求集Requirement set Windows 版 OfficeOffice on Windows
(已连接到 Office 365 订阅)(connected to Office 365 subscription)
iPad 版 OfficeDebug Office Add-ins on iPad and Mac
(已连接到 Office 365 订阅)(connected to Office 365 subscription)
Mac 版 OfficeOffice apps on Mac
(已连接到 Office 365 订阅)(connected to Office 365 subscription)
Office 网页版Office on the web Office Online ServerOffice Online Server
预览Preview 请使用最新的 Office 版本来试用预览 API(你可能需要加入 Office 预览体验成员计划Please use the latest Office version to try preview APIs (you may need to join the Office Insider program)
ExcelApi 1.9ExcelApi 1.9 版本 1903 (内部版本 11425.20204) 或更高版本Version 1903 (Build 11425.20204) or later 2.24 或更高版本2.24 or later 16.24 或更高版本16.24 or later 2019 年 5 月May 2019 N/A
ExcelApi 1.8ExcelApi 1.8 版本 1808(内部版本 10730.20102)或更高版本Version 1808 (Build 10730.20102) or later 2.17 或更高版本2.17 or later 16.17 或更高版本16.17 or later 2018 年 9 月September 2018 N/A
ExcelApi 1.7ExcelApi 1.7 版本 1801(内部版本 9001.2171)或更高版本Version 1801 (Build 9001.2171) or later 2.9 或更高版本2.9 or later 16.9 或更高版本16.9 or later 2018 年 4 月April 2018 N/A
ExcelApi 1.6ExcelApi 1.6 版本 1704(生成号 8201.2001)或更高版本Version 1704 (Build 8201.2001) or later 2.2 或更高版本2.2 or later 15.36 或更高版本15.36 or later 2017 年 4 月April 2017 N/A
ExcelApi 1.5ExcelApi 1.5 版本 1703(内部版本 8067.2070)或更高版本Version 1703 (Build 8067.2070) or later 2.2 或更高版本2.2 or later 15.36 或更高版本15.36 or later 2017 年 3 月March 2017 N/A
ExcelApi 1.4ExcelApi 1.4 版本 1701(内部版本 7870.2024)或更高版本Version 1701 (Build 7870.2024) or later 2.2 或更高版本2.2 or later 15.36 或更高版本15.36 or later 2017 年 1 月January 2017 N/A
ExcelApi 1.3ExcelApi 1.3 版本 1608(内部版本 7369.2055)或更高版本Version 1608 (Build 7369.2055) or later 1.27 或更高版本1.27 or later 15.27 或更高版本15.27 or later 2016 年 9 月September 2016 版本 1608(内部版本 7601.6800)或更高版本Version 1608 (Build 7601.6800) or later
ExcelApi 1.2ExcelApi 1.2 版本 1601(内部版本 6741.2088)或更高版本Version 1601 (Build 6741.2088) or later 1.21 或更高版本1.21 or later 15.22 或更高版本15.22 or later 2016 年 1 月January 2016 N/A
ExcelApi 1.1ExcelApi 1.1 版本 1509(内部版本 4266.1001)或更高版本Version 1509 (Build 4266.1001) or later 1.19 或更高版本1.19 or later 15.20 或更高版本15.20 or later 2016 年 1 月January 2016 N/A

备注

通过 MSI 安装的 Office 2016 的内部版本号为 16.0.4266.1001。The build number for Office 2016 installed via MSI is 16.0.4266.1001. 此版本只包含 ExcelApi 1.1 要求集。This version only contains the ExcelApi 1.1 requirement set.

自定义函数Custom Functions

自定义函数使用独立于核心 Excel JavaScript API 的要求集。Custom Functions use separate requirement sets from the core Excel JavaScript APIs. 下表列出了自定义函数要求集、支持的 Office 主机应用程序,以及这些应用程序的内部版本或版本号。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 Windows 版 OfficeOffice on Windows
(已连接到 Office 365 订阅)(connected to Office 365 subscription)
iPad 版 OfficeDebug Office Add-ins on iPad and Mac
(已连接到 Office 365 订阅)(connected to Office 365 subscription)
Mac 版 OfficeOffice apps on Mac
(已连接到 Office 365 订阅)(connected to Office 365 subscription)
Office 网页版Office on the web Office Online ServerOffice Online Server
CustomFunctionsRuntime 1.1CustomFunctionsRuntime 1.1 版本 1904(内部版本 11601.20144)或更高版本Version 1904 (Build 11601.20144) or later 不支持Not supported 16.24 或更高版本16.24 or later 2019 年 4 月April 2019 N/A

有关版本、内部版本号和 Office Online Server 的详细信息,请参阅:For more information about versions, build numbers, and Office Online Server, see:

Excel JavaScript 预览 APIExcel JavaScript preview APIs

新的 Excel JavaScript API 首先在“预览版”中引入,在进行充分测试并获得用户反馈后,它将成为编号的特定要求集的一部分。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.

第一个表提供了 API 的简明摘要,而后续表提供了详细列表。The first table provides a concise summary of the APIs, while the subsequent table gives a detailed list.

备注

预览 API 可能会发生变更,不适合在生产环境中使用。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. 不要在生产环境或业务关键型文档中使用预览 API。Do not use preview APIs in a production environment or within business-critical documents.

若要使用预览 API,你必须引用 CDN 上的 beta 库(https://appsforoffice.microsoft.com/lib/beta/hosted/office.js)并且你可能还需要加入 Office 预览体验成员计划才能获得新的 Office 版本。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
SlicerSlicer 在表格和数据透视表中插入和配置切片器。Insert and configure slicers to tables and PivotTables. SlicerSlicer
备注Comments 添加、编辑和删除备注。Add, edit, and delete comments. CommentCommentCollectionComment, CommentCollection
工作簿保存关闭Workbook Save and Close 保存和关闭工作簿。Save and close workbooks. WorkbookWorkbook
插入工作簿Insert Workbook 将一个工作簿插入另一个工作簿。Insert one workbook into another. WorkbookWorkbook

以下是当前预览版中的 API 的完整列表。The following is a complete list of APIs currently in preview.

ClassClass Fields 说明Description
CommentComment contentcontent 获取或设置批注的内容。Gets or sets the comment's content.
delete()delete() 删除批注线程。Deletes the comment thread.
getLocation()getLocation() 获取该批注所在的单元格。Gets the cell where this comment is located.
authorEmailauthorEmail 获取批注作者的电子邮件。Gets the email of the comment's author.
authorNameauthorName 获取批注作者的姓名。Gets the name of the comment's author.
creationDatecreationDate 获取批注的创建时间。Gets the creation time of the comment. 如果批注是从备注转换而来的,则返回 null,因为批注没有创建日期。Returns null if the comment was converted from a note, since the comment does not have a creation date.
idid 表示批注标识符。Represents the comment identifier. 只读。Read-only.
repliesreplies 表示与批注关联的回复对象的集合。Represents a collection of reply objects associated with the comment. 只读。Read-only.
CommentCollectionCommentCollection add(content: string, cellAddress: Range | string, contentType?: Excel.ContentType)add(content: string, cellAddress: Range | string, contentType?: Excel.ContentType) 使用给定单元格上的给定内容创建新批注。Creates a new comment with the given content on the given cell. 如果提供的范围大于一个单元格,将引发 InvalidArgument 错误。An invalid argument error is thrown if the provided range is larger than one cell.
getCount()getCount() 获取集合中的批注数量。Gets the number of comments in the collection.
getItem(commentId: string)getItem(commentId: string) 根据其 ID 从集合中获取批注。Gets a comment from the collection based on its ID. 只读。Read-only.
getItemAt(index: number)getItemAt(index: number) 根据其位置从集合中获取批注。Gets a comment from the collection based on its position.
getItemByCell(cellAddress: Range | string)getItemByCell(cellAddress: Range | string) 从指定单元格获取的批注。Gets the comment from the specified cell.
getItemByReplyId(replyId: string)getItemByReplyId(replyId: string) 从具有相应回复 ID 的集合中获取批注。Gets a comment from the collection with the corresponding reply ID.
itemsitems 获取此集合中已加载的子项。Gets the loaded child items in this collection.
CommentReplyCommentReply contentcontent 获取或设置批注的内容。Gets or sets the comment's content.
delete()delete() 删除批注回复。Deletes the comment reply.
getLocation()getLocation() 获取此批注回复所在的单元格。Gets the cell where this comment reply is located.
getParentComment()getParentComment() 获取此回复的父批注。Gets the parent comment of this reply.
authorEmailauthorEmail 获取批注回复作者的电子邮件。Gets the email of the comment reply's author.
authorNameauthorName 获取批注回复作者的姓名。Gets the name of the comment reply's author.
creationDatecreationDate 获取批注回复的创建时间。Gets the creation time of the comment reply.
idid 表示批注回复标识符。Represents the comment reply identifier. 只读。Read-only.
CommentReplyCollectionCommentReplyCollection add(content: string, contentType?: Excel.ContentType)add(content: string, contentType?: Excel.ContentType) 为批注创建批注回复。Creates a comment reply for comment.
getCount()getCount() 获取集合中的批注回复数量。Gets the number of comment replies in the collection.
getItem(commentReplyId: string)getItem(commentReplyId: string) 返回由其 ID 标识的批注回复。Returns a comment reply identified by its ID. 只读。Read-only.
getItemAt(index: number)getItemAt(index: number) 根据其在集合中的位置获取批注回复。Gets a comment reply based on its position in the collection.
itemsitems 获取此集合中已加载的子项。Gets the loaded child items in this collection.
CustomFunctionEventArgsCustomFunctionEventArgs higherTickshigherTicks
lowerTickslowerTicks
PivotLayoutPivotLayout enableFieldListenableFieldList 指定是否可以 UI 中显示字段列表。Specifies whether the field list can be shown in the UI.
getCell(dataHierarchy: DataPivotHierarchy | string, rowItems: Array<PivotItem | string>, columnItems: Array<PivotItem | string>)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. 此方法与在特定单元格上调用 getPivotItems 和 getDataHierarchy 相反。This method is the inverse of calling getPivotItems and getDataHierarchy on a particular cell.
PivotTableStylePivotTableStyle delete()delete() 删除 PivotTableStyle。Deletes the PivotTableStyle.
duplicate()duplicate() 使用所有样式元素的副本创建此 PivotTableStyle 的副本。Creates a duplicate of this PivotTableStyle with copies of all the style elements.
namename 获取 PivotTableStyle 的名称。Gets the name of the PivotTableStyle.
readOnlyreadOnly 指定此 PivotTableStyle 对象是否为只读。Specifies if this PivotTableStyle object is read-only. 只读。Read-only.
PivotTableStyleCollectionPivotTableStyleCollection add(name: string, makeUniqueName?: boolean)add(name: string, makeUniqueName?: boolean) 使用指定名称创建空白 PivotTableStyle。Creates a blank PivotTableStyle with the specified name.
getCount()getCount() 获取集合中 PivotTable 的数量。Gets the number of PivotTable styles in the collection.
getDefault()getDefault() 获取父对象范围的默认 PivotTableStyle。Gets the default PivotTableStyle for the parent object's scope.
getItem(name: string)getItem(name: string) 按名称获取 PivotTableStyle。Gets a PivotTableStyle by name.
getItemOrNullObject(name: string)getItemOrNullObject(name: string) 按名称获取 PivotTableStyle。Gets a PivotTableStyle by name. 如果没有 PivotTableStyle,将返回 null 对象。If the PivotTableStyle does not exist, will return a null object.
itemsitems 获取此集合中已加载的子项。Gets the loaded child items in this collection.
setDefault(newDefaultStyle: PivotTableStyle | string)setDefault(newDefaultStyle: PivotTableStyle | string) 设置在父对象范围内使用的默认 PivotTableStyle。Sets the default PivotTableStyle for use in the parent object's scope.
RangeRange getSpillParent()getSpillParent() 获取 Range 对象,它包含要将某个单元格溢出到的定位单元格。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()getSpillParentOrNullObject() 获取 Range 对象,它包含要将某个单元格溢出到的定位单元格。Gets the range object containing the anchor cell for a cell getting spilled into. 只读。Read-only.
getSpillingToRange()getSpillingToRange() 获取 Range 对象,它在调用定位单元格时包含溢出区域。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()getSpillingToRangeOrNullObject() 获取 Range 对象,它在调用定位单元格时包含溢出区域。Gets the range object containing the spill range when called on an anchor cell. 只读。Read-only.
hasSpillhasSpill 表示所有单元格是否都具有溢出边框。Represents if all cells have a spill border.
heightheight 返回从区域的上边缘到区域的下边缘的 100% 缩放的距离(以磅为单位)。Returns the distance in points, for 100% zoom, from top edge of the range to bottom edge of the range. 只读。Read-only.
leftleft 返回从工作表的左边缘到区域的左边缘的 100% 缩放的距离(以磅为单位)。Returns the distance in points, for 100% zoom, from left edge of the worksheet to left edge of the range. 只读。Read-only.
toptop 返回从工作表的上边缘到区域的上边缘的 100% 缩放的距离(以磅为单位)。Returns the distance in points, for 100% zoom, from top edge of the worksheet to top edge of the range. 只读。Read-only.
widthwidth 返回从区域的左边缘到区域的右边缘的 100% 缩放的距离(以磅为单位)。Returns the distance in points, for 100% zoom, from left edge of the range to right edge of the range. 只读。Read-only.
ShapeShape copyTo(destinationSheet?: Worksheet | string)copyTo(destinationSheet?: Worksheet | string) 复制并粘贴 Shape 对象。Copies and pastes a Shape object.
placementplacement 表示对象如何附加到其下方的单元格。Represents how the object is attached to the cells below it.
ShapeCollectionShapeCollection addSvg(xml: string)addSvg(xml: string) 从 XML 字符串创建可缩放的矢量图形 (SVG) 并将其添加到工作表。Creates a scalable vector graphic (SVG) from an XML string and adds it to the worksheet. 返回表示新图片的 Shape 对象。Returns a Shape object that represents the new image.
SlicerSlicer captioncaption 表示切片器的标题。Represents the caption of slicer.
clearFilters()clearFilters() 清除当前切片器上应用的所有筛选器。Clears all the filters currently applied on the slicer.
delete()delete() 删除切片器。Deletes the slicer.
getSelectedItems()getSelectedItems() 返回所选项目密钥的数组。Returns an array of selected items' keys. 只读。Read-only.
heightheight 表示切片器的高度(以磅为单位)。Represents the height, in points, of the slicer.
leftleft 表示从切片器左侧到工作表左侧的距离(以磅为单位)。Represents the distance, in points, from the left side of the slicer to the left of the worksheet.
namename 表示切片器的名称。Represents the name of slicer.
nameInFormulanameInFormula 表示公式中使用切片器名称。Represents the slicer name used in the formula.
idid 表示切片器的唯一 ID。Represents the unique id of slicer. 只读。Read-only.
isFilterClearedisFilterCleared 如果已清除当前切片器上应用的所有筛选器,则为 True。True if all filters currently applied on the slicer are cleared.
slicerItemsslicerItems 表示作为切片器一部分的 SlicerItems 的集合。Represents the collection of SlicerItems that are part of the slicer. 只读。Read-only.
worksheetworksheet 表示包含切片器的工作表。Represents the worksheet containing the slicer. 只读。Read-only.
selectItems(items?: string[])selectItems(items?: string[]) 根据密钥选择切片器项目。Select slicer items based on their keys. 之前的选择将被清除。Previous selection will be cleared.
sortBysortBy 表示切片器中的项目的排序顺序。Represents the sort order of the items in the slicer. 可能的值为:DataSourceOrder、Ascending、Descending。Possible values are: DataSourceOrder, Ascending, Descending.
stylestyle 表示切片器样式的常量值。Constant value that represents the Slicer style. 可能的值为:SlicerStyleLight1 through SlicerStyleLight6、TableStyleOther1 through TableStyleOther2、 SlicerStyleDark1 through SlicerStyleDark6。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.
toptop 表示从切片器上边缘到工作表顶部的距离(以磅为单位)。Represents the distance, in points, from the top edge of the slicer to the top of the worksheet.
widthwidth 表示切片器的宽度(以磅为单位)。Represents the width, in points, of the slicer.
SlicerCollectionSlicerCollection add(slicerSource: string | PivotTable | Table, sourceField: string | PivotField | number | TableColumn, slicerDestination?: string | Worksheet)add(slicerSource: string | PivotTable | Table, sourceField: string | PivotField | number | TableColumn, slicerDestination?: string | Worksheet) 将新切片器添加到工作簿。Adds a new slicer to the workbook.
getCount()getCount() 返回集合中的切片器数量。Returns the number of slicers in the collection.
getItem(key: string)getItem(key: string) 使用其名称或 ID 获取 Slicer 对象。Gets a slicer object using its name or id.
getItemAt(index: number)getItemAt(index: number) 根据其在集合中的位置获取切片器。Gets a slicer based on its position in the collection.
getItemOrNullObject(key: string)getItemOrNullObject(key: string) 使用其名称或 ID 获取切片器。如果没有切片器项,将返回 null 对象。Gets a slicer using its name or id. If the slicer does not exist, will return a null object.
itemsitems 获取此集合中已加载的子项。Gets the loaded child items in this collection.
SlicerItemSlicerItem isSelectedisSelected 如果选择了切片器项,则为 True。True if the slicer item is selected.
hasDatahasData 如果切片器项包含数据,则为 True。True if the slicer item has data.
keykey 表示代表切片器项的唯一值。Represents the unique value representing the slicer item.
namename 表示 UI 上显示的值。Represents the value displayed in the UI.
SlicerItemCollectionSlicerItemCollection getCount()getCount() 返回切片器中的切片器项的数量。Returns the number of slicer items in the slicer.
getItem(key: string)getItem(key: string) 使用其键或名称获取切片器项对象。Gets a slicer item object using its key or name.
getItemAt(index: number)getItemAt(index: number) 根据其在集合中的位置获取切片器项。Gets a slicer item based on its position in the collection.
getItemOrNullObject(key: string)getItemOrNullObject(key: string) 使用其键或名称获取切片器项。Gets a slicer item using its key or name. 如果没有切片器项,将返回 null 对象。If the slicer item does not exist, will return a null object.
itemsitems 获取此集合中已加载的子项。Gets the loaded child items in this collection.
SlicerStyleSlicerStyle delete()delete() 删除 SlicerStyle。Deletes the SlicerStyle.
duplicate()duplicate() 使用所有样式元素的副本创建此 SlicerStyle 的副本。Creates a duplicate of this SlicerStyle with copies of all the style elements.
namename 获取 SlicerStyle 的名称。Gets the name of the SlicerStyle.
readOnlyreadOnly 指定此 SlicerStyle 对象是否为只读。Specifies if this SlicerStyle object is read-only. 只读。Read-only.
SlicerStyleCollectionSlicerStyleCollection add(name: string, makeUniqueName?: boolean)add(name: string, makeUniqueName?: boolean) 使用指定名称创建空白 SlicerStyle。Creates a blank SlicerStyle with the specified name.
getCount()getCount() 获取集合中的切片器样式数量。Gets the number of slicer styles in the collection.
getDefault()getDefault() 获取父对象范围的默认 SlicerStyle。Gets the default SlicerStyle for the parent object's scope.
getItem(name: string)getItem(name: string) 按名称获取 SlicerStyle。Gets a SlicerStyle by name.
getItemOrNullObject(name: string)getItemOrNullObject(name: string) 按名称获取 SlicerStyle。Gets a SlicerStyle by name. 如果没有 SlicerStyle,将返回 null 对象。If the SlicerStyle does not exist, will return a null object.
itemsitems 获取此集合中已加载的子项。Gets the loaded child items in this collection.
setDefault(newDefaultStyle: SlicerStyle | string)setDefault(newDefaultStyle: SlicerStyle | string) 设置在父对象范围内使用的默认 SlicerStyle。Sets the default SlicerStyle for use in the parent object's scope.
TableTable clearStyle()clearStyle() 将表格更改为使用默认表格样式。Changes the table to use the default table style.
onFilteredonFiltered 在特定表格上应用筛选器时发生。Occurs when filter is applied on a specific table.
TableCollectionTableCollection onFilteredonFiltered 在工作簿或工作表中的任何表格上应用筛选器时发生。Occurs when filter is applied on any table in a workbook or worksheet.
TableFilteredEventArgsTableFilteredEventArgs tableIdtableId 表示应用筛选器的表格的 ID。Represents the id of the table in which the filter is applied..
typetype 表示事件的类型。Represents the type of the event. 有关详细信息,请参阅 Excel.EventType。See Excel.EventType for details.
worksheetIdworksheetId 表示包含表格的工作表的 ID。Represents the id of the worksheet which contains the table.
TableStyleTableStyle delete()delete() 删除 TableStyle。Deletes the TableStyle.
duplicate()duplicate() 使用所有样式元素的副本创建此 TableStyle 的副本。Creates a duplicate of this TableStyle with copies of all the style elements.
namename 获取 TableStyle 的名称。Gets the name of the TableStyle.
readOnlyreadOnly 指定此 TableStyle 对象是否为只读。Specifies if this TableStyle object is read-only. 只读。Read-only.
TableStyleCollectionTableStyleCollection add(name: string, makeUniqueName?: boolean)add(name: string, makeUniqueName?: boolean) 使用指定名称创建空白 TableStyle。Creates a blank TableStyle with the specified name.
getCount()getCount() 获取集合中表格样式的数量。Gets the number of table styles in the collection.
getDefault()getDefault() 获取父对象范围的默认 TableStyle。Gets the default TableStyle for the parent object's scope.
getItem(name: string)getItem(name: string) 按名称获取 TableStyle。Gets a TableStyle by name.
getItemOrNullObject(name: string)getItemOrNullObject(name: string) 按名称获取 TableStyle。Gets a TableStyle by name. 如果没有 TableStyle,将返回 null 对象。If the TableStyle does not exist, will return a null object.
itemsitems 获取此集合中已加载的子项。Gets the loaded child items in this collection.
setDefault(newDefaultStyle: TableStyle | string)setDefault(newDefaultStyle: TableStyle | string) 设置在父对象范围内使用的默认 TableStyle。Sets the default TableStyle for use in the parent object's scope.
TimelineStyleTimelineStyle delete()delete() 删除 TableStyle。Deletes the TableStyle.
duplicate()duplicate() 使用所有样式元素的副本创建此 TimelineStyle 的副本。Creates a duplicate of this TimelineStyle with copies of all the style elements.
namename 获取 TimelineStyle 的名称。Gets the name of the TimelineStyle.
readOnlyreadOnly 指定此 TimelineStyle 对象是否为只读。Specifies if this TimelineStyle object is read-only. 只读。Read-only.
TimelineStyleCollectionTimelineStyleCollection add(name: string, makeUniqueName?: boolean)add(name: string, makeUniqueName?: boolean) 使用指定名称创建空白 TimelineStyle。Creates a blank TimelineStyle with the specified name.
getCount()getCount() 获取集合中日程表样式的数量。Gets the number of timeline styles in the collection.
getDefault()getDefault() 获取父对象范围的默认 TimelineStyle。Gets the default TimelineStyle for the parent object's scope.
getItem(name: string)getItem(name: string) 按名称获取 TimelineStyle。Gets a TimelineStyle by name.
getItemOrNullObject(name: string)getItemOrNullObject(name: string) 按名称获取 TimelineStyle。Gets a TimelineStyle by name. 如果没有 TimelineStyle,将返回 null 对象。If the TimelineStyle does not exist, will return a null object.
itemsitems 获取此集合中已加载的子项。Gets the loaded child items in this collection.
setDefault(newDefaultStyle: TimelineStyle | string)setDefault(newDefaultStyle: TimelineStyle | string) 设置在父对象范围内使用的默认 TimelineStyle。Sets the default TimelineStyle for use in the parent object's scope.
WorkbookWorkbook close(closeBehavior?: Excel.CloseBehavior)close(closeBehavior?: Excel.CloseBehavior) 关闭当前工作簿。Close current workbook.
getActiveSlicer()getActiveSlicer() 获取工作簿中当前处于活动状态的切片器。Gets the currently active slicer in the workbook. 如果没有处于活动状态的切片器,则会引发异常情况。If there is no active slicer, an exception is thrown.
getActiveSlicerOrNullObject()getActiveSlicerOrNullObject() 获取工作簿中当前处于活动状态的切片器。Gets the currently active slicer in the workbook. 如果没有处于活动状态的切片器,则返回 null 对象。If there is no active slicer, a null object is returned.
commentscomments 表示与工作簿关联的批注集合。Represents a collection of Comments associated with the workbook. 只读。Read-only.
pivotTableStylespivotTableStyles 表示一组与工作簿相关联的 PivotTableStyles。Represents a collection of PivotTableStyles associated with the workbook. 只读。Read-only.
slicerStylesslicerStyles 表示一组与工作簿相关联的 SlicerStyles。Represents a collection of SlicerStyles associated with the workbook. 只读。Read-only.
slicersslicers 表示与工作簿关联的切片器集合。Represents a collection of Slicers associated with the workbook. 只读。Read-only.
tableStylestableStyles 表示一组与工作簿相关联的 TableStyles。Represents a collection of TableStyles associated with the workbook. 只读。Read-only.
timelineStylestimelineStyles 表示一组与工作簿相关联的 TimelineStyles。Represents a collection of TimelineStyles associated with the workbook. 只读。Read-only.
save(saveBehavior?: Excel.SaveBehavior)save(saveBehavior?: Excel.SaveBehavior) 保存当前工作簿。Save current workbook.
use1904DateSystemuse1904DateSystem 如果工作簿使用 1904 日期系统,则为 True。True if the workbook uses the 1904 date system.
WorksheetWorksheet commentscomments 返回工作表上的所有 Comments 对象的集合。Returns a collection of all the Comments objects on the worksheet. 只读。Read-only.
onColumnSortedonColumnSorted 在列上排序时发生。Occurs when sorting on columns.
onFilteredonFiltered 在特定工作表上应用筛选器时发生。Occurs when filter is applied on a specific worksheet.
onRowSortedonRowSorted 在行上排序时发生。Occurs when sorting on rows.
onSingleClickedonSingleClicked 在工作表中进行左键单击/点击操作时发生。Occurs when left-clicked/tapped operation happens in the worksheet.
slicersslicers 返回作为工作表一部分的切片器集合。Returns collection of slicers that are part of the worksheet. 只读。Read-only.
WorksheetCollectionWorksheetCollection addFromBase64(base64File: string, sheetNamesToInsert?: string[], positionType?: Excel.WorksheetPositionType, relativeTo?: Worksheet | string)addFromBase64(base64File: string, sheetNamesToInsert?: string[], positionType?: Excel.WorksheetPositionType, relativeTo?: Worksheet | string) 将工作簿的指定工作表插入当前工作簿。Inserts the specified worksheets of a workbook into the current workbook.
onColumnSortedonColumnSorted 在列上排序时发生。Occurs when sorting on columns.
onFilteredonFiltered 在工作簿中应用任何工作表的筛选器时发生。Occurs when any worksheet's filter is applied in the workbook.
onRowSortedonRowSorted 在行上排序时发生。Occurs when sorting on rows.
WorksheetColumnSortedEventArgsWorksheetColumnSortedEventArgs addressaddress 获取区域地址,该地址表示特定工作表上的选定区域。Gets the range address that represents the sorted areas of a specific worksheet.
sourcesource 获取事件源。Gets the source of the event. 有关详细信息,请参阅 Excel.EventSource。See Excel.EventSource for details.
typetype 获取事件的类型。Gets the type of the event. 有关详细信息,请参阅 Excel.EventType。See Excel.EventType for details.
worksheetIdworksheetId 获取发生排序的工作表的 id。Gets the id of the worksheet where the sorting happened.
WorksheetFilteredEventArgsWorksheetFilteredEventArgs typetype 表示事件的类型。Represents the type of the event. 有关详细信息,请参阅 Excel.EventType。See Excel.EventType for details.
worksheetIdworksheetId 表示在其中应用筛选器的工作表的 ID。Represents the id of the worksheet in which the filter is applied.
WorksheetRowSortedEventArgsWorksheetRowSortedEventArgs addressaddress 获取区域地址,该地址表示特定工作表上的选定区域。Gets the range address that represents the sorted areas of a specific worksheet.
sourcesource 获取事件源。Gets the source of the event. 有关详细信息,请参阅 Excel.EventSource。See Excel.EventSource for details.
typetype 获取事件的类型。Gets the type of the event. 有关详细信息,请参阅 Excel.EventType。See Excel.EventType for details.
worksheetIdworksheetId 获取发生排序的工作表的 id。Gets the id of the worksheet where the sorting happened.
WorksheetSingleClickedEventArgsWorksheetSingleClickedEventArgs addressaddress 获取特定工作表中表示被左键单击/点击的单元格的地址。Gets the address that represents the cell which was left-clicked/tapped for a specific worksheet.
OffsetXoffsetX 从左键单击/点击的点到左键单击/点击的单元格的左(RTL 则为右侧)网格线边缘的距离(以磅为单位)。The distance, in points, from the left-clicked/tapped point to the left (right for RTL) gridline edge of the left-clicked/tapped cell.
OffsetYoffsetY 从左键单击/点击的点到左键单击/点击的单元格的顶部网格线边缘的距离(以磅为单位)。The distance, in points, from the left-clicked/tapped point to the top gridline edge of the left-clicked/tapped cell.
typetype 获取事件的类型。Gets the type of the event.
worksheetIdworksheetId 获取已在其中左键单击/点击单元格的工作表的 ID。Gets the id of the worksheet in which the cell was left-clicked/tapped.

Excel JavaScript API 1.9 的最近更新What’s new in Excel JavaScript API 1.9

超过 500 个新 Excel API 随 1.9 要求集一起推出。More than 500 new Excel APIs were introduced with the 1.9 requirement set. 第一个表提供了 API 的简明摘要,而后续表提供了详细列表。The first table provides a concise summary of the APIs, while the subsequent table gives a detailed list.

功能区域Feature area 说明Description 相关对象Relevant objects
ShapeShapes 插入、定位和格式化图像、几何形状和文本框。Insert, position, and format images, geometric shapes and text boxes. ShapeCollection Shape GeometricShape ImageShapeCollection Shape GeometricShape Image
自动筛选Auto Filter 为区域添加筛选器。Add filters to ranges. AutoFilterAutoFilter
AreasAreas 支持非连续区域。Support for discontinuous ranges. RangeAreasRangeAreas
特殊单元格Special Cells 获取在区域内包含日期、备注或公式的单元格。Get cells containing dates, comments, or formulas within a range. RangeRange
查找Find 查找区域或工作表中的值或公式。Find values or formulas within a range or worksheet. RangeWorksheetRangeWorksheet
复制和粘贴Copy and Paste 将值、格式和公式从一个区域复制到另一个区域。Copy values, formats, and formulas from one range to another. RangeRange
CalculationCalculation 更好地控制 Excel 计算引擎。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. ChartChart
RangeFormatRangeFormat 新功能及区域格式。New capabilities with range formats. RangeRange

以下是 ExcelApi 1.9 要求集中 API 的完整列表。The following is a complete list of APIs in the ExcelApi 1.9 requirement set.

ClassClass Fields 说明Description
ApplicationApplication calculationEngineVersioncalculationEngineVersion 返回用于上次完整重新计算的 Excel 计算引擎版本。Returns the Excel calculation engine version used for the last full recalculation. 只读。Read-only.
calculationStatecalculationState 返回应用程序的计算状态。Returns the calculation state of the application. 有关详细信息,请参阅 Excel.CalculationState。See Excel.CalculationState for details. 只读。Read-only.
iterativeCalculationiterativeCalculation 返回“迭代计算”设置。Returns the Iterative Calculation settings.
suspendScreenUpdatingUntilNextSync()suspendScreenUpdatingUntilNextSync() 在下一次调用“context.sync()”前暂停屏幕更新。Suspends sceen updating until the next "context.sync()" is called.
AutoFilterAutoFilter apply(range: Range | string, columnIndex?: number, criteria?: Excel.FilterCriteria)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()clearCriteria() 清除自动筛选器的筛选条件。Clears the filter criteria of the AutoFilter.
getRange()getRange() 返回 Range 对象,该对象表示“自动筛选”应用的区域。Returns the Range object that represents the range to which the AutoFilter applies.
getRangeOrNullObject()getRangeOrNullObject() 返回 Range 对象,该对象表示“自动筛选”应用的区域。Returns the Range object that represents the range to which the AutoFilter applies.
load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
criteriacriteria 在自动筛选区域中保留所有筛选条件的数组。An array that holds all the filter criteria in the autofiltered range. 只读。Read-Only.
enabledenabled 指示是否启用了自动筛选。Indicates if the AutoFilter is enabled or not. 只读。Read-Only.
isDataFilteredisDataFiltered 指示自动筛选是否具有筛选条件。Indicates if the AutoFilter has filter criteria. 只读。Read-Only.
reapply()reapply() 应用当前位于区域上的指定 Autofilter 对象。Applies the specified Autofilter object currently on the range.
remove()remove() 删除区域的自动筛选。Removes the AutoFilter for the range.
CellBorderCellBorder colorcolor 表示color单个边框的属性。Represents the color property of a single border.
stylestyle 表示style单个边框的属性。Represents the style property of a single border.
tintAndShadetintAndShade 表示tintAndShade单个边框的属性。Represents the tintAndShade property of a single border.
weightweight 表示weight单个边框的属性。Represents the weight property of a single border.
CellBorderCollectionCellBorderCollection bottombottom 表示format.borders.bottom属性。Represents the format.borders.bottom property.
diagonalDowndiagonalDown 表示format.borders.diagonalDown属性。Represents the format.borders.diagonalDown property.
diagonalUpdiagonalUp 表示format.borders.diagonalUp属性。Represents the format.borders.diagonalUp property.
horizontalhorizontal 表示format.borders.horizontal属性。Represents the format.borders.horizontal property.
leftleft 表示format.borders.left属性。Represents the format.borders.left property.
rightright 表示format.borders.right属性。Represents the format.borders.right property.
toptop 表示format.borders.top属性。Represents the format.borders.top property.
verticalvertical 表示format.borders.vertical属性。Represents the format.borders.vertical property.
CellPropertiesCellProperties addressaddress 表示address属性。Represents the address property.
addressLocaladdressLocal 表示addressLocal属性。Represents the addressLocal property.
hiddenhidden 表示hidden属性。Represents the hidden property.
CellPropertiesFillCellPropertiesFill colorcolor 表示format.fill.color属性。Represents the format.fill.color property.
patternpattern 表示format.fill.pattern属性。Represents the format.fill.pattern property.
patternColorpatternColor 表示format.fill.patternColor属性。Represents the format.fill.patternColor property.
patternTintAndShadepatternTintAndShade 表示format.fill.patternTintAndShade属性。Represents the format.fill.patternTintAndShade property.
tintAndShadetintAndShade 表示format.fill.tintAndShade属性。Represents the format.fill.tintAndShade property.
CellPropertiesFontCellPropertiesFont boldbold 表示format.font.bold属性。Represents the format.font.bold property.
colorcolor 表示format.font.color属性。Represents the format.font.color property.
italicitalic 表示format.font.italic属性。Represents the format.font.italic property.
namename 表示format.font.name属性。Represents the format.font.name property.
sizesize 表示format.font.size属性。Represents the format.font.size property.
strikethroughstrikethrough 表示format.font.strikethrough属性。Represents the format.font.strikethrough property.
subscriptsubscript 表示format.font.subscript属性。Represents the format.font.subscript property.
superscriptsuperscript 表示format.font.superscript属性。Represents the format.font.superscript property.
tintAndShadetintAndShade 表示format.font.tintAndShade属性。Represents the format.font.tintAndShade property.
underlineunderline 表示format.font.underline属性。Represents the format.font.underline property.
CellPropertiesFormatCellPropertiesFormat autoIndentautoIndent 表示autoIndent属性。Represents the autoIndent property.
Bordersborders 表示borders属性。Represents the borders property.
fillfill 表示fill属性。Represents the fill property.
fontfont 表示font属性。Represents the font property.
horizontalAlignmenthorizontalAlignment 表示horizontalAlignment属性。Represents the horizontalAlignment property.
indentLevelindentLevel 表示indentLevel属性。Represents the indentLevel property.
protectionprotection 表示protection属性。Represents the protection property.
readingOrderreadingOrder 表示readingOrder属性。Represents the readingOrder property.
shrinkToFitshrinkToFit 表示shrinkToFit属性。Represents the shrinkToFit property.
textOrientationtextOrientation 表示textOrientation属性。Represents the textOrientation property.
useStandardHeightuseStandardHeight 表示useStandardHeight属性。Represents the useStandardHeight property.
useStandardWidthuseStandardWidth 表示useStandardWidth属性。Represents the useStandardWidth property.
verticalAlignmentverticalAlignment 表示verticalAlignment属性。Represents the verticalAlignment property.
wrapTextwrapText 表示wrapText属性。Represents the wrapText property.
CellPropertiesProtectionCellPropertiesProtection formulaHiddenformulaHidden 表示format.protection.formulaHidden属性。Represents the format.protection.formulaHidden property.
lockedlocked 表示format.protection.locked属性。Represents the format.protection.locked property.
ChangedEventDetailChangedEventDetail valueAftervalueAfter 表示更改之后的值。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.
valueBeforevalueBefore 表示更改之前的值。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.
valueTypeAftervalueTypeAfter 表示更改之后的值类型。Represents the type of value after changed
valueTypeBeforevalueTypeBefore 表示更改之前的值类型。Represents the type of value before changed
ChartChart activate()activate() 在 Excel UI 中激活图表。Activates the chart in the Excel UI.
pivotOptionspivotOptions 封装数据透视图的选项。Encapsulates the options for a pivot chart. 只读。Read-only.
ChartAreaFormatChartAreaFormat colorSchemecolorScheme 返回或设置图表的配色方案。Returns or sets color scheme of the chart. 读/写。Read/Write.
roundedCornersroundedCorners 指定图表的图表区域是否有圆角。Specifies whether or not chart area of the chart has rounded corners. 读/写。Read/Write.
ChartAxisChartAxis linkNumberFormatlinkNumberFormat 表示数字格式是否链接到单元格。Represents whether or not the number format is linked to the cells. 如果为 true,则数字格式会在单元格中更改时在标签中更改。If true, the number format will change in the labels when it changes in the cells.
ChartBinOptionsChartBinOptions allowOverflowallowOverflow 指定是否在直方图或排列图中启用容器溢出。Specifies whether or not the bin overflow is enabled in a histogram chart or pareto chart. 读/写。Read/Write.
allowUnderflowallowUnderflow 指定是否在直方图或排列图中启用容器下溢。Specifies whether or not the bin underflow is enabled in a histogram chart or pareto chart. 读/写。Read/Write.
countcount 返回或设置直方图或排列图的容器数量。Returns or sets the bin count of a histogram chart or pareto chart. 读/写。Read/Write.
load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
overflowValueoverflowValue 返回或设置直方图或排列图的容器溢出值。Returns or sets the bin overflow value of a histogram chart or pareto chart. 读/写。Read/Write.
typetype 返回或设置直方图或排列图的容器类型。Returns or sets the bin's type for a histogram chart or pareto chart. 读/写。Read/Write.
underflowValueunderflowValue 返回或设置直方图或排列图的容器下溢值。Returns or sets the bin underflow value of a histogram chart or pareto chart. 读/写。Read/Write.
widthwidth 返回或设置直方图或排列图的容器宽度值。Returns or sets the bin width value of a histogram chart or pareto chart. 读/写。Read/Write.
ChartBoxwhiskerOptionsChartBoxwhiskerOptions load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
quartileCalculationquartileCalculation 返回或设置箱形图的四分位点计算类型。Returns or sets the quartile calculation type of a box and whisker chart. 读/写。Read/Write.
showInnerPointsshowInnerPoints 指定在箱形图中是否显示内部点。Specifies whether or not the inner points are shown in a box and whisker chart. 读/写。Read/Write.
showMeanLineshowMeanLine 指定在箱形图中是否显示中线。Specifies whether or not the mean line is shown in a box and whisker chart. 读/写。Read/Write.
showMeanMarkershowMeanMarker 指定在箱形图中是否显示平均值标记。Specifies whether or not the mean marker is shown in a box and whisker chart. 读/写。Read/Write.
showOutlierPointsshowOutlierPoints 指定在箱形图中是否显示离群值点。Specifies whether or not outlier points are shown in a box and whisker chart. 读/写。Read/Write.
ChartDataLabelChartDataLabel linkNumberFormatlinkNumberFormat 布尔值,表示数字格式是否链接到单元格(以便在单元格中更改时标签中的数字格式会发生改变)。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).
ChartDataLabelsChartDataLabels linkNumberFormatlinkNumberFormat 表示数字格式是否链接到单元格。Represents whether or not the number format is linked to the cells. 如果为 true,则数字格式会在单元格中更改时在标签中更改。If true, the number format will change in the labels when it changes in the cells
ChartErrorBarsChartErrorBars endStyleCapendStyleCap 指定误差线是否具有终止端样式。Specifies whether or not the error bars have an end style cap.
includeinclude 指定包含误差线的哪些部分。Specifies which parts of the error bars to include.
load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
formatformat 指定误差线的格式类型。Specifies the formatting type of the error bars.
typetype 误差线标记的区域类型。The type of range marked by the error bars.
visiblevisible 指定是否显示误差线。Specifies whether or not the error bars are displayed.
ChartErrorBarsFormatChartErrorBarsFormat load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
lineline 表示图表线条格式。Represents the chart line formatting.
ChartMapOptionsChartMapOptions labelStrategylabelStrategy 返回或设置区域地图图表的系列地图标签策略。Returns or sets the series map labels strategy of a region map chart. 读/写。Read/Write.
levellevel 返回或设置区域地图图表的系列映射级别。Returns or sets the series mapping level of a region map chart. 读/写。Read/Write.
load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
projectionTypeprojectionType 返回或设置区域地图图表的系列投影类型。Returns or sets the series projection type of a region map chart. 读/写。Read/Write.
ChartPivotOptionsChartPivotOptions load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
showAxisFieldButtonsshowAxisFieldButtons 指定是否在数据透视图上显示轴字段按钮。Specifies whether or not to display the axis field buttons on a PivotChart. ShowAxisFieldButtons 属性对应于“分析”选项卡(在选择数据透视图时可用)的“字段按钮”下拉列表中的“显示坐标轴字段按钮”命令。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.
showLegendFieldButtonsshowLegendFieldButtons 指定是否在数据透视图上显示图例字段按钮。Specifies whether or not to display the legend field buttons on a PivotChart
showReportFilterFieldButtonsshowReportFilterFieldButtons 指定是否在数据透视图上显示报表筛选字段按钮。Specifies whether or not to display the report filter field buttons on a PivotChart.
showValueFieldButtonsshowValueFieldButtons 指定是否在数据透视图上显示值字段按钮。Specifies whether or not to display the show value field buttons on a PivotChart
ChartSeriesChartSeries bubbleScalebubbleScale 这可以是从 0(零)到 300 的整数值,表示默认大小的百分比。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.
gradientMaximumColorgradientMaximumColor 返回或设置区域地图图表系列的最大值的颜色。Returns or sets the color for maximum value of a region map chart series. 读/写。Read/Write.
gradientMaximumTypegradientMaximumType 返回或设置区域地图图表系列的最大值的类型。Returns or sets the type for maximum value of a region map chart series. 读/写。Read/Write.
gradientMaximumValuegradientMaximumValue 返回或设置区域地图图表系列的最大值。Returns or sets the maximum value of a region map chart series. 读/写。Read/Write.
gradientMidpointColorgradientMidpointColor 返回或设置区域地图图表系列的中间值的颜色。Returns or sets the color for midpoint value of a region map chart series. 读/写。Read/Write.
gradientMidpointTypegradientMidpointType 返回或设置区域地图图表系列的中间值的类型。Returns or sets the type for midpoint value of a region map chart series. 读/写。Read/Write.
gradientMidpointValuegradientMidpointValue 返回或设置区域地图图表系列的中间值。Returns or sets the midpoint value of a region map chart series. 读/写。Read/Write.
gradientMinimumColorgradientMinimumColor 返回或设置区域地图图表系列的最小值的颜色。Returns or sets the color for minimum value of a region map chart series. 读/写。Read/Write.
gradientMinimumTypegradientMinimumType 返回或设置区域地图图表系列的最小值的类型。Returns or sets the type for minimum value of a region map chart series. 读/写。Read/Write.
gradientMinimumValuegradientMinimumValue 返回或设置区域地图图表系列的最小值。Returns or sets the minimum value of a region map chart series. 读/写。Read/Write.
gradientStylegradientStyle 返回或设置区域地图图表的系列渐变样式。Returns or sets series gradient style of a region map chart. 读/写。Read/Write.
invertColorinvertColor 返回或设置系列中负数据点的填充颜色。Returns or sets the fill color for negative data points in a series. 读/写。Read/Write.
parentLabelStrategyparentLabelStrategy 返回或设置树状图的系列父标签策略区域。Returns or sets the series parent label strategy area for a treemap chart. 读/写。Read/Write.
binOptionsbinOptions 封装直方图和排列图的容器选项。Encapsulates the bin options for histogram charts and pareto charts. 只读。Read-only.
boxwhiskerOptionsboxwhiskerOptions 封装箱形图的选项。Encapsulates the options for the box and whisker charts. 只读。Read-only.
mapOptionsmapOptions 封装区域地图图表的选项。Encapsulates the options for a region map chart. 只读。Read-only.
xErrorBarsxErrorBars 表示图表系列的误差线对象。Represents the error bar object of a chart series.
yErrorBarsyErrorBars 表示图表系列的误差线对象。Represents the error bar object of a chart series.
showConnectorLinesshowConnectorLines 指定是否在瀑布图中显示连接线。Specifies whether or not connector lines are shown in waterfall charts. 读/写。Read/Write.
showLeaderLinesshowLeaderLines 指定是否在系列中显示每个数据标签的引导线。Specifies whether or not leader lines are displayed for each data label in the series. 读/写。Read/Write.
splitValuesplitValue 返回或设置复合饼图或复合条饼图中分隔两部分的阈值。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.
ChartTrendlineLabelChartTrendlineLabel linkNumberFormatlinkNumberFormat 布尔值,表示数字格式是否链接到单元格(以便在单元格中更改时标签中的数字格式会发生改变)。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).
ColumnPropertiesColumnProperties addressaddress 表示address属性。Represents the address property.
addressLocaladdressLocal 表示addressLocal属性。Represents the addressLocal property.
columnIndexcolumnIndex 表示columnIndex属性。Represents the columnIndex property.
ConditionalFormatConditionalFormat getRanges()getRanges() 返回将为其应用条件格式的 RangeAreas,它包含一个或多个矩形区域。Returns the RangeAreas, comprising one or more rectangular ranges, the conditonal format is applied to. 只读。Read-only.
DataValidationDataValidation getInvalidCells()getInvalidCells() 返回包含一个或多个矩形区域的 RangeAreas,它具有无效单元格值。Returns a RangeAreas, comprising one or more rectangular ranges, with invalid cell values. 如果所有单元格值都有效,则此函数将引发 ItemNotFound 错误。If all cell values are valid, this function will throw an ItemNotFound error.
getInvalidCellsOrNullObject()getInvalidCellsOrNullObject() 返回包含一个或多个矩形区域的 RangeAreas,它具有无效单元格值。Returns a RangeAreas, comprising one or more rectangular ranges, with invalid cell values. 如果所有单元格值都有效,则此函数将返回 null。If all cell values are valid, this function will return null.
FilterCriteriaFilterCriteria subFieldsubField 筛选器使用该属性对 richvalue 执行丰富的筛选。The property used by the filter to do rich filter on richvalues.
GeometricShapeGeometricShape load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
idid 返回形状标识符。Returns the shape identifier. 只读。Read-only.
shapeshape 返回几何形状的形状对象。Returns the Shape object for the geometric shape. 只读。Read-only.
GroupShapeCollectionGroupShapeCollection getCount()getCount() 返回形状组中的形状数量。Returns the number of shapes in the shape group. 只读。Read-only.
getItem(key: string)getItem(key: string) 按名称或 ID 获取形状。Gets a shape using its Name or ID.
getItemAt(index: number)getItemAt(index: number) 根据其在集合中的位置获取形状。Gets a shape based on its position in the collection.
load(option?: OfficeExtension.LoadOption)load(option?: OfficeExtension.LoadOption)
load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
itemsitems 获取此集合中已加载的子项。Gets the loaded child items in this collection.
HeaderFooterHeaderFooter centerFootercenterFooter 获取或设置工作表的中心页脚。Gets or sets the center footer of the worksheet.
centerHeadercenterHeader 获取或设置工作表的中心页眉。Gets or sets the center header of the worksheet.
LeftFooterleftFooter 获取或设置工作表的左侧页脚。Gets or sets the left footer of the worksheet.
leftHeaderleftHeader 获取或设置工作表的左侧页眉。Gets or sets the left header of the worksheet.
load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
rightFooterrightFooter 获取或设置工作表的右侧页脚。Gets or sets the right footer of the worksheet.
rightHeaderrightHeader 获取或设置工作表的右侧页眉。Gets or sets the right header of the worksheet.
HeaderFooterGroupHeaderFooterGroup load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
defaultForAllPagesdefaultForAllPages 常规页眉/页脚,除非指定偶数页/奇数页或首页,否则适用于所有页面,The general header/footer, used for all pages unless even/odd or first page is specified.
evenPagesevenPages 用于偶数页的页眉/页脚,需要为奇数页指定奇数页页眉/页脚。The header/footer to use for even pages, odd header/footer needs to be specified for odd pages.
firstPagefirstPage 首页的页眉/页脚,为所有其他页使用常规或偶数页/奇数页页眉/页脚。The first page header/footer, for all other pages general or even/odd is used.
oddPagesoddPages 用于奇数页的页眉/页脚,需要为偶数页指定偶数页页眉/页脚。The header/footer to use for odd pages, even header/footer needs to be specified for even pages.
statestate 获取或设置所设置的页眉/页脚的状态。Gets or sets the state of which headers/footers are set. 有关详细信息,请参阅 Excel.HeaderFooterState。See Excel.HeaderFooterState for details.
useSheetMarginsuseSheetMargins 获取或设置一个标记,指示页眉/页脚是否与工作表的页面布局选项中设置的页边距对齐。Gets or sets a flag indicating if headers/footers are aligned with the page margins set in the page layout options for the worksheet.
useSheetScaleuseSheetScale 获取或设置一个标记,指示是否应按照工作表的页面布局选项中设置的页面缩放百分比来缩放页眉/页脚。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.
ImageImage load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
formatformat 返回图像的格式。Returns the format of the image. 只读。Read-only.
idid 表示图像对象的形状标识符。Represents the shape identifier for the image object. 只读。Read-only.
shapeshape 返回与图像关联的形状对象。Returns the Shape object associated with the image. 只读。Read-only.
IterativeCalculationIterativeCalculation enabledenabled 如果 Excel 使用迭代来处理循环引用,则为 True。True if Excel will use iteration to resolve circular references.
load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
maxChangemaxChange 返回或设置 Excel 处理循环引用时迭代之间的最大变化值。Returns or sets the maximum amount of change between each iteration as Excel resolves circular references.
maxIterationmaxIteration 返回或设置 Excel 处理循环引用的最大迭代次数。Returns or sets the maximum number of iterations that Excel can use to resolve a circular reference.
LineLine beginArrowheadLengthbeginArrowheadLength 表示指定线条始端的箭头长度。Represents the length of the arrowhead at the beginning of the specified line.
beginArrowheadStylebeginArrowheadStyle 表示指定线条始端的箭头样式。Represents the style of the arrowhead at the beginning of the specified line.
beginArrowheadWidthbeginArrowheadWidth 表示指定线条始端的箭头宽度。Represents the width of the arrowhead at the beginning of the specified line.
connectBeginShape(shape: Excel.Shape, connectionSite: number)connectBeginShape(shape: Excel.Shape, connectionSite: number) 将指定连接线的始端附加到指定形状。Attaches the beginning of the specified connector to a specified shape.
connectEndShape(shape: Excel.Shape, connectionSite: number)connectEndShape(shape: Excel.Shape, connectionSite: number) 将指定连接线的末端附加到指定形状。Attaches the end of the specified connector to a specified shape.
connectorTypeconnectorType 表示线条的连接器类型。Represents the connector type for the line.
disconnectBeginShape()disconnectBeginShape() 使指定连接线的始端与形状脱离。Detaches the beginning of the specified connector from a shape.
disconnectEndShape()disconnectEndShape() 使指定连接线的末端与形状脱离。Detaches the end of the specified connector from a shape.
endArrowheadLengthendArrowheadLength 表示指定线条末端的箭头长度。Represents the length of the arrowhead at the end of the specified line.
endArrowheadStyleendArrowheadStyle 表示指定线条末端的箭头样式。Represents the style of the arrowhead at the end of the specified line.
endArrowheadWidthendArrowheadWidth 表示指定线条末端的箭头宽度。Represents the width of the arrowhead at the end of the specified line.
load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
beginConnectedShapebeginConnectedShape 表示指定线条始端所附加到的形状。Represents the shape to which the beginning of the specified line is attached. 只读。Read-only.
beginConnectedSitebeginConnectedSite 表示连接线始端所连接的连接站点。Represents the connection site to which the beginning of a connector is connected. 只读。Read-only. 当线条的始端没有附加到任何形状时,返回 null。Returns null when the beginning of the line is not attached to any shape.
endConnectedShapeendConnectedShape 表示指定线条末端所附加到的形状。Represents the shape to which the end of the specified line is attached. 只读。Read-only.
endConnectedSiteendConnectedSite 表示连接线末端所连接的连接站点。Represents the connection site to which the end of a connector is connected. 只读。Read-only. 当线条的末端没有附加到任何形状时,返回 null。Returns null when the end of the line is not attached to any shape.
idid 表示形状标识符。Represents the shape identifier. 只读。Read-only.
isBeginConnectedisBeginConnected 指定指定线条的始端是否连接到形状。Specifies whether or not the beginning of the specified line is connected to a shape. 只读。Read-only.
isEndConnectedisEndConnected 指定指定线条的末端是否连接到形状。Specifies whether or not the end of the specified line is connected to a shape. 只读。Read-only.
shapeshape 返回与线条关联的形状对象。Returns the Shape object associated with the line. 只读。Read-only.
PageBreakPageBreak delete()delete() 删除分页符对象。Deletes a page break object.
getCellAfterBreak()getCellAfterBreak() 获取分页符后的第一个单元格。Gets the first cell after the page break.
load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
columnIndexcolumnIndex 表示分页符的列索引Represents the column index for the page break
rowIndexrowIndex 表示分页符的行索引Represents the row index for the page break
PageBreakCollectionPageBreakCollection add(pageBreakRange: Range | string)add(pageBreakRange: Range | string) 在指定区域的左上角单元格之前添加分页符。Adds a page break before the top-left cell of the range specified.
getCount()getCount() 获取集合中的分页符数量。Gets the number of page breaks in the collection.
getItem(index: number)getItem(index: number) 通过索引获取分页符对象。Gets a page break object via the index.
load(option?: OfficeExtension.LoadOption)load(option?: OfficeExtension.LoadOption)
load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
itemsitems 获取此集合中已加载的子项。Gets the loaded child items in this collection.
removePageBreaks()removePageBreaks() 重置集合中的所有手动分页符。Resets all manual page breaks in the collection.
PageLayoutPageLayout blackAndWhiteblackAndWhite 获取或设置工作表的黑白打印选项。Gets or sets the worksheet's black and white print option.
bottomMarginbottomMargin 获取或设置要用于打印的工作表的底部页边距(以磅为单位)。Gets or sets the worksheet's bottom page margin to use for printing in points.
centerHorizontallycenterHorizontally 获取或设置工作表的中心水平标记。Gets or sets the worksheet's center horizontally flag. 此标记确定在打印时是否水平居中工作表。This flag determines whether the worksheet will be centered horizontally when it's printed.
centerVerticallycenterVertically 获取或设置工作表的中心垂直标记。Gets or sets the worksheet's center vertically flag. 此标记确定在打印时是否垂直居中工作表。This flag determines whether the worksheet will be centered vertically when it's printed.
draftModedraftMode 获取或设置工作表的草稿模式选项。Gets or sets the worksheet's draft mode option. 如果为 True,则将打印没有图形的工作表。If true the sheet will be printed without graphics.
firstPageNumberfirstPageNumber 获取或设置要打印的工作表的首页页码。Gets or sets the worksheet's first page number to print. Null 值表示“自动”页码编号。Null value represents "auto" page numbering.
footerMarginfooterMargin 获取或设置在打印时使用的工作表的页脚边距(以磅为单位)。Gets or sets the worksheet's footer margin, in points, for use when printing.
getPrintArea()getPrintArea() 获取包含一个或多个矩形区域的 RangeAreas 对象,它表示工作表的打印区域。Gets the RangeAreas object, comprising one or more rectangular ranges, that represents the print area for the worksheet. 如果没有打印区域,则将引发 ItemNotFound 错误。If there is no print area, an ItemNotFound error will be thrown.
getPrintAreaOrNullObject()getPrintAreaOrNullObject() 获取包含一个或多个矩形区域的 RangeAreas 对象,它表示工作表的打印区域。Gets the RangeAreas object, comprising one or more rectangular ranges, that represents the print area for the worksheet. 如果没有打印区域,则将返回 null 对象。If there is no print area, a null object will be returned.
getPrintTitleColumns()getPrintTitleColumns() 获取表示标题列的 Range 对象。Gets the range object representing the title columns.
getPrintTitleColumnsOrNullObject()getPrintTitleColumnsOrNullObject() 获取表示标题列的 Range 对象。Gets the range object representing the title columns. 如果未设置,则将返回 null 对象。If not set, this will return a null object.
getPrintTitleRows()getPrintTitleRows() 获取表示标题行的 Range 对象。Gets the range object representing the title rows.
getPrintTitleRowsOrNullObject()getPrintTitleRowsOrNullObject() 获取表示标题行的 Range 对象。Gets the range object representing the title rows. 如果未设置,则将返回 null 对象。If not set, this will return a null object.
headerMarginheaderMargin 获取或设置在打印时使用的工作表的页眉边距(以磅为单位)。Gets or sets the worksheet's header margin, in points, for use when printing.
leftMarginleftMargin 获取或设置在打印时使用的工作表的左边距(以磅为单位)。Gets or sets the worksheet's left margin, in points, for use when printing.
load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
orientationorientation 获取或设置工作表的页面方向。Gets or sets the worksheet's orientation of the page.
paperSizepaperSize 获取或设置工作表的页面纸张大小。Gets or sets the worksheet's paper size of the page.
printCommentsprintComments 获取或设置在打印时是否应该显示工作表的批注。Gets or sets whether the worksheet's comments should be displayed when printing.
printErrorsprintErrors 获取或设置工作表的打印错误选项。Gets or sets the worksheet's print errors option.
printGridlinesprintGridlines 获取或设置工作表的打印网格线标记。Gets or sets the worksheet's print gridlines flag. 此标记确定是否打印网格线。This flag determines whether gridlines will be printed or not.
printHeadingsprintHeadings 获取或设置工作表的打印标题标记。Gets or sets the worksheet's print headings flag. 此标记确定是否打印标题。This flag determines whether headings will be printed or not.
printOrderprintOrder 获取或设置工作表的页面打印顺序选项。Gets or sets the worksheet's page print order option. 它指定用于处理打印页码的顺序。This specifies the order to use for processing the page number printed.
headersFootersheadersFooters 工作表的页眉和页脚配置。Header and footer configuration for the worksheet.
rightMarginrightMargin 获取或设置在打印时使用的工作表的右边距(以磅为单位)。Gets or sets the worksheet's right margin, in points, for use when printing.
setPrintArea(printArea: Range | RangeAreas | string)setPrintArea(printArea: Range | RangeAreas | string) 设置工作表的打印区域。Sets the worksheet's print area.
setPrintMargins(unit: Excel.PrintMarginUnit, marginOptions: Excel.PageLayoutMarginOptions)setPrintMargins(unit: Excel.PrintMarginUnit, marginOptions: Excel.PageLayoutMarginOptions) 设置带单位的工作表的页边距。Sets the worksheet's page margins with units.
setPrintMargins(unitString: "Points" | "Inches" | "Centimeters", marginOptions: Excel.PageLayoutMarginOptions)setPrintMargins(unitString: "Points" | "Inches" | "Centimeters", marginOptions: Excel.PageLayoutMarginOptions) 设置带单位的工作表的页边距。Sets the worksheet's page margins with units.
setPrintTitleColumns(printTitleColumns: Range | string)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)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.
topMargintopMargin 获取或设置在打印时使用的工作表的上边距(以磅为单位)。Gets or sets the worksheet's top margin, in points, for use when printing.
zoomzoom 获取或设置工作表的打印缩放选项。Gets or sets the worksheet's print zoom options.
PageLayoutMarginOptionsPageLayoutMarginOptions bottombottom 表示要在打印时使用的页面布局下边距(使用指定的单位)。Represents the page layout bottom margin in the unit specified to use for printing.
footerfooter 表示要在打印时使用的页面布局页脚边距(使用指定的单位)。Represents the page layout footer margin in the unit specified to use for printing.
headerheader 表示要在打印时使用的页面布局页眉边距(使用指定的单位)。Represents the page layout header margin in the unit specified to use for printing.
leftleft 表示要在打印时使用的页面布局左边距(使用指定的单位)。Represents the page layout left margin in the unit specified to use for printing.
rightright 表示要在打印时使用的页面布局右边距(使用指定的单位)。Represents the page layout right margin in the unit specified to use for printing.
toptop 表示要在打印时使用的页面布局上边距(使用指定的单位)。Represents the page layout top margin in the unit specified to use for printing.
PageLayoutZoomOptionsPageLayoutZoomOptions horizontalFitToPageshorizontalFitToPages 水平放置的页数。Number of pages to fit horizontally. 如果使用百分比缩放,则此值可以为 null。This value can be null if percentage scale is used.
scalescale 打印页面缩放值可以介于 10 至 400 之间。Print page scale value can be between 10 and 400. 如果已指定适应页面高度或宽度,则此值可以为 null。This value can be null if fit to page tall or wide is specified.
verticalFitToPagesverticalFitToPages 垂直放置的页数。Number of pages to fit vertically. 如果使用百分比缩放,则此值可以为 null。This value can be null if percentage scale is used.
PivotFieldPivotField sortByValues(sortBy: Excel.SortBy, valuesHierarchy: Excel.DataPivotHierarchy, pivotItemScope?: Array<PivotItem | string>)sortByValues(sortBy: Excel.SortBy, valuesHierarchy: Excel.DataPivotHierarchy, pivotItemScope?: Array<PivotItem | string>) 按给定范围中的指定值对 PivotField 进行排序。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>)sortByValues(sortByString: "Ascending" | "Descending", valuesHierarchy: Excel.DataPivotHierarchy, pivotItemScope?: Array<PivotItem | string>) 按给定范围中的指定值对 PivotField 进行排序。Sorts the PivotField by specified values in a given scope. 该范围定义将使用哪些特定值进行排序The scope defines which specific values will be used to sort when
PivotLayoutPivotLayout autoFormatautoFormat 指定是否在刷新或移动字段时自动进行格式化Specifies whether formatting will be automatically formatted when it’s refreshed or when fields are moved
getDataHierarchy(cell: Range | string)getDataHierarchy(cell: Range | string) 获取 DataHierarchy,它用于计算数据透视表中指定区域内的值。Gets the DataHierarchy that is used to calculate the value in a specified range within the PivotTable.
getPivotItems(axis: Excel.PivotAxis, cell: Range | string)getPivotItems(axis: Excel.PivotAxis, cell: Range | string) 从构成数据透视表中指定区域内的值的轴获取 PivotItems。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)getPivotItems(axisString: "Unknown" | "Row" | "Column" | "Data" | "Filter", cell: Range | string) 从构成数据透视表中指定区域内的值的轴获取 PivotItems。Gets the PivotItems from an axis that make up the value in a specified range within the PivotTable.
preserveFormattingpreserveFormatting 指定是否在通过透视、排序或更改页面字段项等操作来刷新或重新计算报表时保留格式。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)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. 这与从 UI 应用自动排序的行为相同。This behaves identically to applying an autosort from the UI.
setAutoSortOnCell(cell: Range | string, sortByString: "Ascending" | "Descending")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. 这与从 UI 应用自动排序的行为相同。This behaves identically to applying an autosort from the UI.
PivotTablePivotTable enableDataValueEditingenableDataValueEditing 指定数据透视表是否允许用户编辑数据体中的值。Specifies whether the PivotTable allows values in the data body to be edited by the user.
useCustomSortListsuseCustomSortLists 指定排序时,数据透视表是否使用自定义列表。Specifies whether the PivotTable uses custom lists when sorting.
RangeRange autoFill(destinationRange: Range | string, autoFillType?: Excel.AutoFillType)autoFill(destinationRange: Range | string, autoFillType?: Excel.AutoFillType) 填充区域从当前区域到目标区域。Fills range from the current range to the destination range.
autoFill(destinationRange: Range | string, autoFillType?: "FillDefault" | "FillCopy" | "FillSeries" | "FillFormats" | "FillValues" | "FillDays" | "FillWeekdays" | "FillMonths" | "FillYears" | "LinearTrend" | "GrowthTrend" | "FlashFill")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()convertDataTypeToText() 将具有数据类型的区域单元格转换为文本。Converts the range cells with datatypes into text.
convertToLinkedDataType(serviceID: number, languageCulture: string)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)copyFrom(sourceRange: Range | RangeAreas | string, copyType?: Excel.RangeCopyType, skipBlanks?: boolean, transpose?: boolean) 将单元格数据或格式从源区域或 RangeAreas 复制到当前区域。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)copyFrom(sourceRange: Range | RangeAreas | string, copyTypeString?: "All" | "Formulas" | "Values" | "Formats", skipBlanks?: boolean, transpose?: boolean) 将单元格数据或格式从源区域或 RangeAreas 复制到当前区域。Copies cell data or formatting from the source range or RangeAreas to the current range.
find(text: string, criteria: Excel.SearchCriteria)find(text: string, criteria: Excel.SearchCriteria) 根据指定的条件查找给定的字符串。Finds the given string based on the criteria specified.
findOrNullObject(text: string, criteria: Excel.SearchCriteria)findOrNullObject(text: string, criteria: Excel.SearchCriteria) 根据指定的条件查找给定的字符串。Finds the given string based on the criteria specified.
flashFill()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)getCellProperties(cellPropertiesLoadOptions: CellPropertiesLoadOptions) 返回一个 2D 数组,其中封装了每个单元格的字体、填充、边框、对齐方式和其他属性数据。Returns a 2D array, encapsulating the data for each cell's font, fill, borders, alignment, and other properties.
getColumnProperties(columnPropertiesLoadOptions: ColumnPropertiesLoadOptions)getColumnProperties(columnPropertiesLoadOptions: ColumnPropertiesLoadOptions) 返回一个一维数组,其中封装了每个列的字体、填充、边框、对齐方式和其他属性数据。Returns a single-dimensional array, encapsulating the data for each column's font, fill, borders, alignment, and other properties. 对于给定列中每个单元格不一致的属性,将返回 null。For properties that are not consistent across each cell within a given column, null will be returned.
getRowProperties(rowPropertiesLoadOptions: RowPropertiesLoadOptions)getRowProperties(rowPropertiesLoadOptions: RowPropertiesLoadOptions) 返回一个一维数组,其中封装了每个行的字体、填充、边框、对齐方式和其他属性数据。Returns a single-dimensional array, encapsulating the data for each row's font, fill, borders, alignment, and other properties. 对于给定行中每个单元格不一致的属性,将返回 null。For properties that are not consistent across each cell within a given row, null will be returned.
getSpecialCells(cellType: Excel.SpecialCellType, cellValueType?: Excel.SpecialCellValueType)getSpecialCells(cellType: Excel.SpecialCellType, cellValueType?: Excel.SpecialCellValueType) 获取包含一个或多个矩形区域的 RangeAreas 对象,它表示匹配指定类型和值的所有单元格。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")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") 获取包含一个或多个矩形区域的 RangeAreas 对象,它表示匹配指定类型和值的所有单元格。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)getSpecialCellsOrNullObject(cellType: Excel.SpecialCellType, cellValueType?: Excel.SpecialCellValueType) 获取包含一个或多个区域的 RangeAreas 对象,它表示匹配指定类型和值的所有单元格。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")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") 获取包含一个或多个区域的 RangeAreas 对象,它表示匹配指定类型和值的所有单元格。Gets the RangeAreas object, comprising one or more ranges, that represents all the cells that match the specified type and value.
getTables(fullyContained?: boolean)getTables(fullyContained?: boolean) 获取与区域重叠的限定范围的表格集合。Gets a scoped collection of tables that overlap with the range.
linkedDataTypeStatelinkedDataTypeState 表示每个单元格的数据类型状态。Represents the data type state of each cell. 只读。Read-only.
removeDuplicates(columns: number[], includesHeader: boolean)removeDuplicates(columns: number[], includesHeader: boolean) 从列指定的区域中删除重复值。Removes duplicate values from the range specified by the columns.
replaceAll(text: string, replacement: string, criteria: Excel.ReplaceCriteria)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[][])setCellProperties(cellPropertiesData: SettableCellProperties[][]) 根据单元格属性的 2D 数组更新区域,它封装了字体、填充、边框、对齐方式等内容。Updates the range based on a 2D array of cell properties , encapsulating things like font, fill, borders, alignment, and so forth.
setColumnProperties(columnPropertiesData: SettableColumnProperties[])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()setDirty() 设置下一次重新计算发生时要重新计算的区域。Set a range to be recalculated when the next recalculation occurs.
setRowProperties(rowPropertiesData: SettableRowProperties[])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.
RangeAreasRangeAreas calculate()calculate() 计算 RangeAreas 中的所有单元格。Calculates all cells in the RangeAreas.
clear(applyTo?: Excel.ClearApplyTo)clear(applyTo?: Excel.ClearApplyTo) 清除包含此 RangeAreas 对象的每个区域的值、格式、填充、边框等。Clears values, format, fill, border, etc on each of the areas that comprise this RangeAreas object.
clear(applyToString?: "All" | "Formats" | "Contents" | "Hyperlinks" | "RemoveHyperlinks")clear(applyToString?: "All" | "Formats" | "Contents" | "Hyperlinks" | "RemoveHyperlinks") 清除包含此 RangeAreas 对象的每个区域的值、格式、填充、边框等。Clears values, format, fill, border, etc on each of the areas that comprise this RangeAreas object.
convertDataTypeToText()convertDataTypeToText() 将 RangeAreas 中具有数据类型的所有单元格转换为文本。Converts all cells in the RangeAreas with datatypes into text.
convertToLinkedDataType(serviceID: number, languageCulture: string)convertToLinkedDataType(serviceID: number, languageCulture: string) 将 RangeAreas 中的所有单元格转换为链接数据类型。Converts all cells in the RangeAreas into linked datatype.
copyFrom(sourceRange: Range | RangeAreas | string, copyType?: Excel.RangeCopyType, skipBlanks?: boolean, transpose?: boolean)copyFrom(sourceRange: Range | RangeAreas | string, copyType?: Excel.RangeCopyType, skipBlanks?: boolean, transpose?: boolean) 将单元格数据或格式从源区域或 RangeAreas 复制到当前 RangeAreas。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)copyFrom(sourceRange: Range | RangeAreas | string, copyTypeString?: "All" | "Formulas" | "Values" | "Formats", skipBlanks?: boolean, transpose?: boolean) 将单元格数据或格式从源区域或 RangeAreas 复制到当前 RangeAreas。Copies cell data or formatting from the source range or RangeAreas to the current RangeAreas.
getEntireColumn()getEntireColumn() 返回表示 RangeAreas 的整个列的 RangeAreas 对象(例如,如果当前 RangeAreas 表示单元格“B4:E11, H2”,它将返回表示列“B:E, H:H”的 RangeAreas)。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()getEntireRow() 获取表示 RangeAreas 的整个行的 RangeAreas 对象(例如,如果当前 RangeAreas 表示单元格“B4:E11”,它将返回表示行“4:11”的 RangeAreas)。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)getIntersection(anotherRange: Range | RangeAreas | string) 返回 RangeAreas 对象,它表示给定区域或 RangeAreas 的交集。Returns the RangeAreas object that represents the intersection of the given ranges or RangeAreas. 如果未找到任何交集,则将引发 ItemNotFound 错误。If no intersection is found, an ItemNotFound error will be thrown.
getIntersectionOrNullObject(anotherRange: Range | RangeAreas | string)getIntersectionOrNullObject(anotherRange: Range | RangeAreas | string) 返回 RangeAreas 对象,它表示给定区域或 RangeAreas 的交集。Returns the RangeAreas object that represents the intersection of the given ranges or RangeAreas. 如果未找到任何交集,将返回 null 对象。If no intersection is found, a null object is returned.
getOffsetRangeAreas(rowOffset: number, columnOffset: number)getOffsetRangeAreas(rowOffset: number, columnOffset: number) 返回 RangeAreas 对象,它按特定的行和列偏移量进行移动。Returns an RangeAreas object that is shifted by the specific row and column offset. 返回的 RangeAreas 的维度将与原始对象匹配。The dimension of the returned RangeAreas will match the original object. 如果生成的 RangeAreas 强行超出工作表网格的边界,则将引发错误。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)getSpecialCells(cellType: Excel.SpecialCellType, cellValueType?: Excel.SpecialCellValueType) 返回一个 RangeAreas 对象,它表示匹配指定类型和值的所有单元格。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")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") 返回一个 RangeAreas 对象,它表示匹配指定类型和值的所有单元格。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)getSpecialCellsOrNullObject(cellType: Excel.SpecialCellType, cellValueType?: Excel.SpecialCellValueType) 返回一个 RangeAreas 对象,它表示匹配指定类型和值的所有单元格。Returns a RangeAreas object that represents all the cells that match the specified type and value. 如果未找到符合条件的特殊单元格,则返回 null 对象。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")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") 返回一个 RangeAreas 对象,它表示匹配指定类型和值的所有单元格。Returns a RangeAreas object that represents all the cells that match the specified type and value. 如果未找到符合条件的特殊单元格,则返回 null 对象。Returns a null object if no special cells are found that match the criteria.
getTables(fullyContained?: boolean)getTables(fullyContained?: boolean) 返回与此 RangeAreas 对象中的任何区域重叠的限定范围的表格集合。Returns a scoped collection of tables that overlap with any range in this RangeAreas object.
getUsedRangeAreas(valuesOnly?: boolean)getUsedRangeAreas(valuesOnly?: boolean) 返回使用的 RangeAreas,它包含 RangeAreas 对象中的各个矩形区域的所有已用区域。Returns the used RangeAreas that comprises all the used areas of individual rectangular ranges in the RangeAreas object.
getUsedRangeAreasOrNullObject(valuesOnly?: boolean)getUsedRangeAreasOrNullObject(valuesOnly?: boolean) 返回使用的 RangeAreas,它包含 RangeAreas 对象中的各个矩形区域的所有已用区域。Returns the used RangeAreas that comprises all the used areas of individual rectangular ranges in the RangeAreas object.
load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
addressaddress 返回 A1 样式中的 RageAreas 引用。Returns the RageAreas reference in A1-style. 地址值将包含单元格的每个矩形块的工作表名称(例如“Sheet1!A1:B4, Sheet1!D1:D4”)。Address value will contain the worksheet name for each rectangular block of cells (e.g. "Sheet1!A1:B4, Sheet1!D1:D4"). 只读。Read-only.
addressLocaladdressLocal 返回用户区域设置中的 RageAreas 引用。Returns the RageAreas reference in the user locale. 只读。Read-only.
areaCountareaCount 返回包含此 RangeAreas 对象的矩形区域的数量。Returns the number of rectangular ranges that comprise this RangeAreas object.
areasareas 返回包含此 RangeAreas 对象的矩形区域的集合。Returns a collection of rectangular ranges that comprise this RangeAreas object.
cellCountcellCount 返回 RangeAreas 对象中的单元格数量,即总计各个矩形区域的单元格计数。Returns the number of cells in the RangeAreas object, summing up the cell counts of all of the individual rectangular ranges. 如果单元格计数超过 2^31-1 (2,147,483,647),则返回 -1。Returns -1 if the cell count exceeds 2^31-1 (2,147,483,647). 只读。Read-only.
conditionalFormatsconditionalFormats 返回与此 RangeAreas 对象中的任何单元格相交的 ConditionalFormats 集合。Returns a collection of ConditionalFormats that intersect with any cells in this RangeAreas object. 只读。Read-only.
dataValidationdataValidation 返回 RangeAreas 中的所有区域的 dataValidation 对象。Returns a dataValidation object for all ranges in the RangeAreas.
formatformat 返回一个 rangeFormat 对象,其中封装了 RangeAreas 对象中的所有区域的字体、填充、边框、对齐方式和其他属性。Returns a rangeFormat object, encapsulating the the font, fill, borders, alignment, and other properties for all ranges in the RangeAreas object. 只读。Read-only.
isEntireColumnisEntireColumn 指示此 RangeAreas 对象上的所有区域是否表示整列(例如“A:C, Q:Z”)。Indicates whether all the ranges on this RangeAreas object represent entire columns (e.g., "A:C, Q:Z"). 只读。Read-only.
isEntireRowisEntireRow 指示此 RangeAreas 对象上的所有区域是否表示整行(例如“1:3, 5:7”)。Indicates whether all the ranges on this RangeAreas object represent entire rows (e.g., "1:3, 5:7"). 只读。Read-only.
worksheetworksheet 返回当前 RangeAreas 的工作表。Returns the worksheet for the current RangeAreas. 只读。Read-only.
setDirty()setDirty() 设置要在下一次重新计算时重新进行计算的 RangeAreas。Sets the RangeAreas to be recalculated when the next recalculation occurs.
stylestyle 表示此 RangeAreas 对象中的所有区域的样式。Represents the style for all ranges in this RangeAreas object.
track()track() 根据文档中的相应更改来跟踪对象,以便进行自动调整。Track the object for automatic adjustment based on surrounding changes in the document. 此调用是 context.trackedObjects.add(thisObject) 的缩写。This call is a shorthand for context.trackedObjects.add(thisObject). 如果你在“.sync”调用之间和按顺序执行“.run”批处理之外使用此对象,并且在对象上设置属性或调用方法时出现“InvalidObjectPath”错误,则需要在首次创建对象时为跟踪的对象集合添加对象。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()untrack() 释放与此对象关联的内存(如果先前已跟踪过)。Release the memory associated with this object, if it has previously been tracked. 此调用是 context.trackedObjects.add(thisObject) 的缩写。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. 在内存释放生效之前,你需要调用“context.sync()”。You will need to call "context.sync()" before the memory release takes effect.
RangeBorderRangeBorder tintAndShadetintAndShade 返回或设置一个使区域边框的颜色变亮或变暗的双精度数值,该值介于 -1(最暗)与 1(最亮)之间,初始颜色为 0。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.
RangeBorderCollectionRangeBorderCollection tintAndShadetintAndShade 返回或设置一个使区域边框的颜色变亮或变暗的双精度数值,该值介于 -1(最暗)与 1(最亮)之间,初始颜色为 0。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.
RangeCollectionRangeCollection getCount()getCount() 返回 RangeCollection 中的区域数量。Returns the number of ranges in the RangeCollection.
getItemAt(index: number)getItemAt(index: number) 根据其在 RangeCollection 中的位置返回 Range 对象。Returns the range object based on its position in the RangeCollection.
load(option?: OfficeExtension.LoadOption)load(option?: OfficeExtension.LoadOption)
load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
itemsitems 获取此集合中已加载的子项。Gets the loaded child items in this collection.
RangeFillRangeFill patternpattern 获取或设置区域的图案。Gets or sets the pattern of a Range. 有关详细信息,请参阅 Excel.FillPattern。See Excel.FillPattern for details. 不支持 LinearGradient 和 RectangularGradient。LinearGradient and RectangularGradient are not supported.
patternColorpatternColor 设置 HTML 颜色代码,它表示窗体 #RRGGBB(例如“FFA500”)的区域图案颜色或作为已命名的 HTML 颜色(例如“orange”)。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").
patternTintAndShadepatternTintAndShade 返回或设置一个使区域填充的图案颜色变亮或变暗的双精度数值,该值介于 -1(最暗)与 1(最亮)之间,初始颜色为 0。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.
tintAndShadetintAndShade 返回或设置一个使区域填充的颜色变亮或变暗的双精度数值,该值介于 -1(最暗)与 1(最亮)之间,初始颜色为 0。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.
RangeFontRangeFont strikethroughstrikethrough 表示字体的删除线状态。Represents the strikethrough status of font. Null 值表示整个区域没有统一的删除线设置。A null value indicates that the entire range doesn't have uniform Strikethrough setting.
subscriptsubscript 表示字体的下标状态。Represents the Subscript status of font.
superscriptsuperscript 表示字体的上标状态。Represents the Superscript status of font.
tintAndShadetintAndShade 返回或设置一个使区域字体的颜色变亮或变暗的双精度数值,该值介于 -1(最暗)与 1(最亮)之间,初始颜色为 0。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.
RangeFormatRangeFormat autoIndentautoIndent 指示将文本对齐方式设为相等分布时文本是否会自动缩进。Indicates if text is automatically indented when text alignment is set to equal distribution.
indentLevelindentLevel 0 到 250 之间的一个整数,指示缩进水平。An integer from 0 to 250 that indicates the indent level.
readingOrderreadingOrder 区域的读取顺序。The reading order for the range.
shrinkToFitshrinkToFit 指示文本是否自动缩小以适合可用列宽。Indicates if text automatically shrinks to fit in the available column width.
RemoveDuplicatesResultRemoveDuplicatesResult load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
removedremoved 由操作删除的重复行数。Number of duplicated rows removed by the operation.
uniqueRemaininguniqueRemaining 所生成的区域中存在的剩余唯一行数。Number of remaining unique rows present in the resulting range.
ReplaceCriteriaReplaceCriteria completeMatchcompleteMatch 指定匹配必须是完整匹配还是部分匹配。Specifies whether the match needs to be complete or partial. 默认值为 false(部分)。Default is false (partial).
matchCasematchCase 指定匹配是否区分大小写。Specifies whether the match is case sensitive. 默认值为 false(不区分大小写)。Default is false (insensitive).
RowPropertiesRowProperties addressaddress 表示address属性。Represents the address property.
addressLocaladdressLocal 表示addressLocal属性。Represents the addressLocal property.
rowIndexrowIndex 表示rowIndex属性。Represents the rowIndex property.
SearchCriteriaSearchCriteria completeMatchcompleteMatch 指定匹配必须是完整匹配还是部分匹配。Specifies whether the match needs to be complete or partial. 默认值为 false(部分)。Default is false (partial).
matchCasematchCase 指定匹配是否区分大小写。Specifies whether the match is case sensitive. 默认值为 false(不区分大小写)。Default is false (insensitive).
searchDirectionsearchDirection 指定搜索方向。Specifies the search direction. 默认值为向前。Default is forward. 请参阅 Excel.SearchDirection。See Excel.SearchDirection.
SettableCellPropertiesSettableCellProperties formatformat 表示format属性。Represents the format property.
hyperlinkhyperlink 表示hyperlink属性。Represents the hyperlink property.
stylestyle 表示style属性。Represents the style property.
SettableColumnPropertiesSettableColumnProperties columnHiddencolumnHidden 表示columnHidden属性。Represents the columnHidden property.
formatformat 表示format属性。Represents the format property.
SettableRowPropertiesSettableRowProperties 格式:Excel.CellPropertiesFormatformat: Excel.CellPropertiesFormat 表示format属性。Represents the format property.
rowHiddenrowHidden 表示rowHidden属性。Represents the rowHidden property.
ShapeShape altTextDescriptionaltTextDescription 返回或设置形状对象的可选说明文本。Returns or sets the alternative description text for a Shape object.
altTextTitlealtTextTitle 返回或设置形状对象的可选标题文本。Returns or sets the alternative title text for a Shape object.
delete()delete() 从工作表删除形状。Removes the shape from the worksheet.
geometricShapeTypegeometricShapeType 表示此几何形状的几何形状类型。Represents the geometric shape type of this geometric shape. 有关详细信息,请参阅 Excel.GeometricShapeType。See Excel.GeometricShapeType for details. 如果形状类型不是“GeometricShape”,返回 NULL。Returns null if the shape type is not "GeometricShape".
getAsImage(format: Excel.PictureFormat)getAsImage(format: Excel.PictureFormat) 将形状转换为图像并将图像返回为 base64 编码字符串。Converts the shape to an image and returns the image as a base64-encoded string. DPI 为 96。The DPI is 96. 仅支持格式 Excel.PictureFormat.BMPExcel.PictureFormat.PNGExcel.PictureFormat.JPEGExcel.PictureFormat.GIFThe 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")getAsImage(formatString: "UNKNOWN" | "BMP" | "JPEG" | "GIF" | "PNG" | "SVG") 将形状转换为图像并将图像返回为 base64 编码字符串。Converts the shape to an image and returns the image as a base64-encoded string. DPI 为 96。The DPI is 96. 仅支持格式 Excel.PictureFormat.BMPExcel.PictureFormat.PNGExcel.PictureFormat.JPEGExcel.PictureFormat.GIFThe only supported formats are Excel.PictureFormat.BMP, Excel.PictureFormat.PNG, Excel.PictureFormat.JPEG, and Excel.PictureFormat.GIF.
heightheight 表示形状的高度(以磅为单位)。Represents the height, in points, of the shape.
incrementLeft(increment: number)incrementLeft(increment: number) 以指定磅数水平移动形状。Moves the shape horizontally by the specified number of points.
incrementRotation(increment: number)incrementRotation(increment: number) 将形状围绕 z 轴旋转特定度数。Rotates the shape clockwise around the z-axis by the specified number of degrees.
incrementTop(increment: number)incrementTop(increment: number) 以指定磅数垂直移动形状。Moves the shape vertically by the specified number of points.
leftleft 从形状左侧到工作表左侧的距离(以磅为单位)。The distance, in points, from the left side of the shape to the left side of the worksheet.
load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
lockAspectRatiolockAspectRatio 指定此形状的纵横比是否锁定。Specifies whether or not the aspect ratio of this shape is locked.
名称name 表示形状的名称。Represents the name of the shape.
connectionSiteCountconnectionSiteCount 返回此形状上的连接站点数。Returns the number of connection sites on this shape. 只读。Read-only.
fillfill 返回此形状的填充格式。Returns the fill formatting of this shape. 只读。Read-only.
geometricShapegeometricShape 返回与形状关联的几何形状。Returns the geometric shape associated with the shape. 如果形状类型不是“GeometricShape”,则会引发错误。An error will be thrown if the shape type is not "GeometricShape".
group 返回与形状关联的形状组。Returns the shape group associated with the shape. 如果形状类型不是“GroupShape”,则会引发错误。An error will be thrown if the shape type is not "GroupShape".
idid 表示形状标识符。Represents the shape identifier. 只读。Read-only.
imageimage 返回与形状关联的图像。Returns the image associated with the shape. 如果形状类型不是“Image”,则会引发错误。An error will be thrown if the shape type is not "Image".
levellevel 表示指定形状的级别。Represents the level of the specified shape. 例如,级别 0 表示形状不是任何组的一部分,级别 1 表示形状是顶级组的一部分,级别 2 表示形状是顶级子组的一部分。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.
lineline 返回与形状关联的线条。Returns the line associated with the shape. 如果形状类型不是“Line”,则会引发错误。An error will be thrown if the shape type is not "Line".
lineFormatlineFormat 返回此形状的线条格式。Returns the line formatting of this shape. 只读。Read-only.
onActivatedonActivated 当激活形状时发生此事件。Occurs when the shape is activated.
onDeactivatedonDeactivated 当停用形状时发生此事件。Occurs when the shape is deactivated.
parentGroupparentGroup 表示此形状的父组。Represents the parent group of this shape.
textFrametextFrame 返回此形状的文本框对象。Returns the text frame object of this shape. 只读。Read only.
typetype 返回此形状的类型。Returns the type of this shape. 有关详细信息,请参阅 Excel.ShapeType。See Excel.ShapeType for details. 只读。Read-only.
zOrderPositionzOrderPosition 返回指定形状在 z 顺序中的位置,0 表示顺序堆栈的底部。Returns the position of the specified shape in the z-order, with 0 representing the bottom of the order stack. 只读。Read-only.
rotationrotation 表示形状的旋转度数。Represents the rotation, in degrees, of the shape.
scaleHeight(scaleFactor: number, scaleType: Excel.ShapeScaleType, scaleFrom?: Excel.ShapeScaleFrom)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")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)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")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)setZOrder(position: Excel.ShapeZOrder) 将指定形状沿集合的 z 顺序向上或向下移动,将其移动到其他形状的前面或后面。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")setZOrder(positionString: "BringToFront" | "BringForward" | "SendToBack" | "SendBackward") 将指定形状沿集合的 z 顺序向上或向下移动,将其移动到其他形状的前面或后面。Moves the specified shape up or down the collection's z-order, which shifts it in front of or behind other shapes.
toptop 从形状上边缘到工作表上边缘之间的距离(以磅为单位)。The distance, in points, from the top edge of the shape to the top edge of the worksheet.
visiblevisible 表示此形状的可视性。Represents the visibility of this shape.
widthwidth 表示形状的宽度(以磅为单位)。Represents the width, in points, of the shape.
ShapeActivatedEventArgsShapeActivatedEventArgs shapeIdshapeId 获取已激活的形状的 ID。Gets the id of the activated shape.
typetype 获取事件的类型。Gets the type of the event. 有关详细信息,请参阅 Excel.EventType。See Excel.EventType for details.
worksheetIdworksheetId 获取其中的形状已启用的工作表的 ID。Gets the id of the worksheet in which the shape is activated.
ShapeCollectionShapeCollection addGeometricShape(geometricShapeType: Excel.GeometricShapeType)addGeometricShape(geometricShapeType: Excel.GeometricShapeType) 将几何形状添加到工作表。Adds a geometric shape to the worksheet. 返回一个 Shape 对象,该对象代表新图形。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")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. 返回一个 Shape 对象,该对象代表新图形。Returns a Shape object that represents the new shape.
addGroup(values: Array<string | Shape>)addGroup(values: Array<string | Shape>) 在此集合的工作表中对形状的子集进行分组。Groups a subset of shapes in this collection's worksheet. 返回表示新形状组的 Shape 对象。Returns a Shape object that represents the new group of shapes.
addImage(base64ImageString: string)addImage(base64ImageString: string) 从 base64 编码的字符串创建图像并将其添加到工作表。Creates an image from a base64-encoded string and adds it to the worksheet. 返回表示新图片的 Shape 对象。Returns the Shape object that represents the new image.
addLine(startLeft: number, startTop: number, endLeft: number, endTop: number, connectorType?: Excel.ConnectorType)addLine(startLeft: number, startTop: number, endLeft: number, endTop: number, connectorType?: Excel.ConnectorType) 将线条添加到工作表。Adds a line to worksheet. 返回表示新线条的 Shape 对象。Returns a Shape object that represents the new line.
addLine(startLeft: number, startTop: number, endLeft: number, endTop: number, connectorType?: "Straight" | "Elbow" | "Curve")addLine(startLeft: number, startTop: number, endLeft: number, endTop: number, connectorTypeString?: "Straight" | "Elbow" | "Curve") 将线条添加到工作表。Adds a line to worksheet. 返回表示新线条的 Shape 对象。Returns a Shape object that represents the new line.
addTextBox(text?: string)addTextBox(text?: string) 使用提供的文本作为内容,将文本框添加到工作表。Adds a text box to the worksheet with the provided text as the content. 返回表示新文本框的 Shape 对象。Returns a Shape object that represents the new text box.
getCount()getCount() 返回工作表中的形状数。Returns the number of shapes in the worksheet. 只读。Read-only.
getItem(key: string)getItem(key: string) 按名称或 ID 获取形状。Gets a shape using its Name or ID.
getItemAt(index: number)getItemAt(index: number) 使用其在集合中的位置获取形状。Gets a shape using its position in the collection.
load(option?: OfficeExtension.LoadOption)load(option?: OfficeExtension.LoadOption)
load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
itemsitems 获取此集合中已加载的子项。Gets the loaded child items in this collection.
ShapeDeactivatedEventArgsShapeDeactivatedEventArgs shapeIdshapeId 获取已停用的形状的 ID。Gets the id of the shape deactivated shape.
typetype 获取事件的类型。Gets the type of the event. 有关详细信息,请参阅 Excel.EventType。See Excel.EventType for details.
worksheetIdworksheetId 获取其中的形状已停用的工作表的 ID。Gets the id of the worksheet in which the shape is deactivated.
ShapeFillShapeFill clear()clear() 清除此形状的填充格式。Clears the fill formatting of this shape.
foregroundColorforegroundColor 表示窗体 #RRGGBB(例如“FFA500”)的形状填充前景色(采用 HTML 颜色格式)或作为已命名的 HTML 颜色(例如“orange”)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[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
typetype 返回形状的填充类型。Returns the fill type of the shape. 只读。Read-only. 有关详细信息,请参阅 Excel.ShapeFillType。See Excel.ShapeFillType for details.
setSolidColor(color: string)setSolidColor(color: string) 将形状的填充格式设置为统一颜色。Sets the fill formatting of the shape to a uniform color. 这样可将填充类型更改为“Solid”。This changes the fill type to "Solid".
transparencytransparency 返回或设置填充的透明度百分比,取值范围为 0.0(不透明)到 1.0(清晰)之间。Returns or sets the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). 如果形状类型不支持透明度或形状填充透明度不一致(例如使用渐变填充类型),则返回 null。Returns null if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type.
ShapeFontShapeFont boldbold 表示字体的加粗状态。Represents the bold status of font. 如果 TextRange 包含粗体和非粗体文本片段,则返回 null。Returns null the TextRange includes both bold and non-bold text fragments.
colorcolor 文本颜色的 HTML 颜色代码表示(例如,#FF0000 表示红色)。The HTML color code representation of the text color (e.g. "#FF0000" represents red). 如果 TextRange 包含具有不同颜色的文本片段,则返回 null。Returns null if the TextRange includes text fragments with different colors.
italicitalic 表示字体的斜体状态。Represents the italic status of font. 如果 TextRange 包含斜体和非斜体文本片段,则返回 null。Returns null if the TextRange includes both italic and non-italic text fragments.
load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
namename 表示字体名称(例如“Calibri”)。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.
sizesize 表示以磅为单位的字体大小(例如 11)。Represents font size in points (e.g. 11). 如果 TextRange 包含具有不同字体大小的文本片段,则返回 null。Returns null if the TextRange includes text fragments with different font sizes.
underlineunderline 应用于字体的下划线类型。Type of underline applied to the font. 如果 TextRange 包含具有不同下划线样式的文本片段,则返回 null。Returns null if the TextRange includes text fragments with different underline styles. 有关详细信息,请参阅 Excel.ShapeFontUnderlineStyle。See Excel.ShapeFontUnderlineStyle for details.
ShapeGroupShapeGroup load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
idid 表示形状标识符。Represents the shape identifier. 只读。Read-only.
shapeshape 返回与组关联的 Shape 对象。Returns the Shape object associated with the group. 只读。Read-only.
shapesshapes 返回 Shape 对象的集合。Returns the collection of Shape objects. 只读。Read-only.
ungroup()ungroup() 取消分组指定形状组中的任何已分组形状。Ungroups any grouped shapes in the specified shape group.
ShapeLineFormatShapeLineFormat colorcolor 表示窗体 #RRGGBB(例如“FFA500”)的线条颜色(采用 HTML 颜色格式)或作为已命名的 HTML 颜色(例如“orange”)Represents the line color in HTML color format, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange").
dashStyledashStyle 表示形状的线条样式。Represents the line style of the shape. 当线条不可见或短划线样式不一致时,返回 null。Returns null when the line is not visible or there are inconsistent dash styles. 有关详细信息,请参阅 Excel.ShapeLineStyle。See Excel.ShapeLineStyle for details.
load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
stylestyle 表示形状的线条样式。Represents the line style of the shape. 当线条不可见或样式不一致时,返回 null。Returns null when the line is not visible or there are inconsistent styles. 有关详细信息,请参阅 Excel.ShapeLineStyle。See Excel.ShapeLineStyle for details.
transparencytransparency 将指定线条的透明度表示为从 0.0(不透明)到 1.0(清晰)的值。Represents the degree of transparency of the specified line as a value from 0.0 (opaque) through 1.0 (clear). 当形状的透明度不一致时,返回 null。Returns null when the shape has inconsistent transparencies.
visiblevisible 表示形状元素的线条格式是否可见。Represents whether or not the line formatting of a shape element is visible. 当形状的可见性不一致时,返回 null。Returns null when the shape has inconsistent visibilities.
weightweight 表示线条的粗细(以磅为单位)。Represents the weight of the line, in points. 当线条不可见或线条粗细不一致时,返回 null。Returns null when the line is not visible or there are inconsistent line weights.
SortFieldSortField subFieldsubField 表示子字段,它是要排序的复合值的目标属性名称。Represents the subfield that is the target property name of a rich value to sort on.
StyleCollectionStyleCollection getCount()getCount() 获取集合中的样式数量。Gets the number of styles in the collection.
getItemAt(index: number)getItemAt(index: number) 根据其在集合中的位置获取样式。Gets a style based on its position in the collection.
TableTable autoFilterautoFilter 表示表格的 AutoFilter 对象。Represents the AutoFilter object of the table. 只读。Read-Only.
TableAddedEventArgsTableAddedEventArgs sourcesource 获取事件源。Gets the source of the event. 有关详细信息,请参阅 Excel.EventSource。See Excel.EventSource for details.
tableIdtableId 获取已添加的表格的 ID。Gets the id of the table that is added.
typetype 获取事件的类型。Gets the type of the event. 有关详细信息,请参阅 Excel.EventType。See Excel.EventType for details.
worksheetIdworksheetId 获取已在其中添加表格的工作表的 ID。Gets the id of the worksheet in which the table is added.
TableChangedEventArgsTableChangedEventArgs detailsdetails 表示更改详情的信息Represents the information about the change detail
TableCollectionTableCollection onAddedonAdded 在工作簿中添加新表格时发生。Occurs when new table is added in a workbook.
onDeletedonDeleted 在工作簿中删除指定的表格时发生。Occurs when the specified table is deleted in a workbook.
TableDeletedEventArgsTableDeletedEventArgs sourcesource 指定时间源。Specifies the source of the event. 有关详细信息,请参阅 Excel.EventSource。See Excel.EventSource for details.
tableIdtableId 指定已删除的表格的 ID。Specifies the id of the table that is deleted.
tableNametableName 指定已删除的表格的名称。Specifies the name of the table that is deleted.
typetype 指定事件类型。Specifies the type of the event. 有关详细信息,请参阅 Excel.EventType。See Excel.EventType for details.
worksheetIdworksheetId 指定已在其内删除表格的工作表的 ID。Specifies the id of the worksheet in which the table is deleted.
TableScopedCollectionTableScopedCollection getCount()getCount() 获取集合中的表数量。Gets the number of tables in the collection.
getFirst()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)getItem(key: string) 按名称或 ID 获取表。Gets a table by Name or ID.
load(option?: OfficeExtension.LoadOption)load(option?: OfficeExtension.LoadOption)
load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
itemsitems 获取此集合中已加载的子项。Gets the loaded child items in this collection.
TextFrameTextFrame autoSizeSettingautoSizeSetting 获取或设置文本框的自动调整大小设置。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.
bottomMarginbottomMargin 表示文本框的下边距(以磅为单位)。Represents the bottom margin, in points, of the text frame.
deleteText()deleteText() 删除文本框中的所有文本。Deletes all the text in the text frame.
horizontalAlignmenthorizontalAlignment 表示文本框的水平对齐方式。Represents the horizontal alignment of the text frame. 有关详细信息,请参阅 Excel.ShapeTextHorizontalAlignment。See Excel.ShapeTextHorizontalAlignment for details.
horizontalOverflowhorizontalOverflow 表示文本框的水平溢出行为。Represents the horizontal overflow behavior of the text frame. 有关详细信息,请参阅 Excel.ShapeTextHorizontalOverflow。See Excel.ShapeTextHorizontalOverflow for details.
leftMarginleftMargin 表示文本框的左边距(以磅为单位)。Represents the left margin, in points, of the text frame.
load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
orientationorientation 表示文本框的文本方向。Represents the text orientation of the text frame. 有关详细信息,请参阅 Excel.ShapeTextOrientation。See Excel.ShapeTextOrientation for details.
readingOrderreadingOrder 表示文本框从左到右或从右到左的读取顺序。Represents the reading order of the text frame, either left-to-right or right-to-left. 有关详细信息,请参阅 Excel.ShapeTextReadingOrder。See Excel.ShapeTextReadingOrder for details.
hasTexthasText 指定文本框是否包含文本。Specifies whether the text frame contains text.
textRangetextRange 表示附加到文本框中形状上的文本,以及用于操作文本的属性和方法。Represents the text that is attached to a shape in the text frame, and properties and methods for manipulating the text. 有关详细信息,请参阅 Excel.TextRange。See Excel.TextRange for details.
rightMarginrightMargin 表示文本框的右边距(以磅为单位)。Represents the right margin, in points, of the text frame.
topMargintopMargin 表示文本框的上边距(以磅为单位)。Represents the top margin, in points, of the text frame.
verticalAlignmentverticalAlignment 表示文本框的垂直对齐方式。Represents the vertical alignment of the text frame. 有关详细信息,请参阅 Excel.ShapeTextVerticalAlignment。See Excel.ShapeTextVerticalAlignment for details.
verticalOverflowverticalOverflow 表示文本框的垂直溢出行为。Represents the vertical overflow behavior of the text frame. 有关详细信息,请参阅 Excel.ShapeTextVerticalOverflow。See Excel.ShapeTextVerticalOverflow for details.
TextRangeTextRange getSubstring(start: number, length?: number)getSubstring(start: number, length?: number) 返回给定区域内子字符串的 TextRange 对象。Returns a TextRange object for the substring in the given range.
load(propertyNames?: string | string[])load(propertyNames?: string | string[]) 将命令加入队列以加载对象的指定属性。Queues up a command to load the specified properties of the object. 在读取属性之前,你必须调用“context.sync()”。You must call "context.sync()" before reading the properties.
fontfont 返回一个 ShapeFont 对象,该对象表示文本范围的字体属性。Returns a ShapeFont object that represents the font attributes for the text range. 只读。Read-only.
texttext 表示文本范围的纯文本内容。Represents the plain text content of the text range.
WorkbookWorkbook chartDataPointTrackchartDataPointTrack 如果工作簿中的所有图表都跟踪它们所附加的实际数据点,则为 True。True if all charts in the workbook are tracking the actual data points to which they are attached.
getActiveChart()getActiveChart() 获取工作簿中的当前活动图表。Gets the currently active chart in the workbook. 如果没有活动图表,则在调用此语句时将引发异常If there is no active chart, will throw exception when invoke this statement
getActiveChartOrNullObject()getActiveChartOrNullObject() 获取工作簿中的当前活动图表。Gets the currently active chart in the workbook. 如果没有活动图表,则返回 null 对象If there is no active chart, will return null object
getIsActiveCollabSession()getIsActiveCollabSession() 如果多个用户正在编辑工作簿(共同创作),则为 True。True if the workbook is being edited by multiple users (co-authoring).
getSelectedRanges()getSelectedRanges() 从工作簿中获取当前选定的一个或多个区域。Gets the currently selected one or more ranges from the workbook. 与 getSelectedRange() 不同,此方法返回表示所有选定区域的 RangeAreas 对象。Unlike getSelectedRange(), this method returns a RangeAreas object that represents all the selected ranges.
isDirtyisDirty 指定自上次保存以来是否对指定的工作簿进行任何更改。Specifies whether or not changes have been made since the workbook was last saved.
autoSaveautoSave 指定工作簿是否处于自动保存模式。Specifies whether or not the workbook is in autosave mode. 只读。Read-Only.
calculationEngineVersioncalculationEngineVersion 返回有关 Excel 计算引擎的版本号。Returns a number about the version of Excel Calculation Engine. 只读。Read-Only.
onAutoSaveSettingChangedonAutoSaveSettingChanged 在工作簿上更改“自动保存”设置时发生。Occurs when the autoSave setting is changed on the workbook.
previouslySavedpreviouslySaved 指定工作簿是否已在本地或在线保存。Specifies whether or not the workbook has ever been saved locally or online. 只读。Read-Only.
usePrecisionAsDisplayedusePrecisionAsDisplayed 如果此工作簿中的计算仅使用显示的数字精度来完成,则为 True。True if calculations in this workbook will be done using only the precision of the numbers as they're displayed.
WorkbookAutoSaveSetting ChangedEventArgsWorkbookAutoSaveSetting ChangedEventArgs typetype 表示事件的类型。Represents the type of the event. 有关详细信息,请参阅 Excel.EventType。See Excel.EventType for details.
WorksheetWorksheet enableCalculationenableCalculation 获取或设置工作表的 enableCalculation 属性。Gets or sets the enableCalculation property of the worksheet.
findAll(text: string, criteria: Excel.WorksheetSearchCriteria)findAll(text: string, criteria: Excel.WorksheetSearchCriteria) 根据指定的条件查找给定字符串的所有匹配项,并将它们作为包含一个或多个矩形区域的 RangeAreas 对象返回。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)findAllOrNullObject(text: string, criteria: Excel.WorksheetSearchCriteria) 根据指定的条件查找给定字符串的所有匹配项,并将它们作为包含一个或多个矩形区域的 RangeAreas 对象返回。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)getRanges(address?: string) 获取按地址或名称指定的 RangeAreas 对象,它表示一个或多个矩形区域块。Gets the RangeAreas object, representing one or more blocks of rectangular ranges, specified by the address or name.
autoFilterautoFilter 表示工作表的 AutoFilter 对象。Represents the AutoFilter object of the worksheet. 只读。Read-Only.
horizontalPageBreakshorizontalPageBreaks 获取工作表的水平分页符集合。Gets the horizontal page break collection for the worksheet. 此集合仅包含手动分页符。This collection only contains manual page breaks.
onFormatChangedonFormatChanged 在特定工作表上更改格式时发生。Occurs when format changed on a specific worksheet.
pageLayoutpageLayout 获取工作表的 PageLayout 对象。Gets the PageLayout object of the worksheet.
shapesshapes 返回工作表上的所有 Shape 对象的集合。Returns the collection of all the Shape objects on the worksheet. 只读。Read-only.
verticalPageBreaksverticalPageBreaks 获取工作表的垂直分页符集合。Gets the vertical page break collection for the worksheet. 此集合仅包含手动分页符。This collection only contains manual page breaks.
replaceAll(text: string, replacement: string, criteria: Excel.ReplaceCriteria)replaceAll(text: string, replacement: string, criteria: Excel.ReplaceCriteria) 根据当前工作表中指定的条件查找并替换给定的字符串。Finds and replaces the given string based on the criteria specified within the current worksheet.
WorksheetChangedEventArgsWorksheetChangedEventArgs detailsdetails 表示更改详情的信息Represents the information about the change detail
WorksheetCollectionWorksheetCollection onChangedonChanged 在更改工作簿中的任何工作表时发生。Occurs when any worksheet in the workbook is changed.
onFormatChangedonFormatChanged 在更改工作簿中的任何工作表的格式时发生。Occurs when any worksheet in the workbook has format changed.
onSelectionChangedonSelectionChanged 在任何工作表上更改选择时发生。Occurs when the selection changes on any worksheet.
WorksheetFormatChangedEventArgsWorksheetFormatChangedEventArgs addressaddress 获取区域地址,该地址表示特定工作表上的更改区域。Gets the range address that represents the changed area of a specific worksheet.
getRange(ctx: Excel.RequestContext)getRange(ctx: Excel.RequestContext) 获取区域,该区域表示特定工作表上的更改区域。Gets the range that represents the changed area of a specific worksheet.
getRangeOrNullObject(ctx: Excel.RequestContext)getRangeOrNullObject(ctx: Excel.RequestContext) 获取区域,该区域表示特定工作表上的更改区域。Gets the range that represents the changed area of a specific worksheet. 它可能会返回 null 对象。It might return null object.
sourcesource 获取事件源。Gets the source of the event. 有关详细信息,请参阅 Excel.EventSource。See Excel.EventSource for details.
typetype 获取事件的类型。Gets the type of the event. 有关详细信息,请参阅 Excel.EventType。See Excel.EventType for details.
worksheetIdworksheetId 获取其中的数据发生更改的工作表的 ID。Gets the id of the worksheet in which the data changed.
WorksheetSearchCriteriaWorksheetSearchCriteria completeMatchcompleteMatch 指定匹配必须是完整匹配还是部分匹配。Specifies whether the match needs to be complete or partial. 默认值为 false(部分)。Default is false (partial).
matchCasematchCase 指定匹配是否区分大小写。Specifies whether the match is case sensitive. 默认值为 false(不区分大小写)。Default is false (insensitive).

Excel JavaScript API 1.8 的最近更新What’s new in Excel JavaScript API 1.8

Excel JavaScript API 要求集 1.8 的功能包括适用于数据透视表、数据验证、图表、图表事件、性能选项和工作簿创建的 API。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

加载项通过数据透视表 API 的波形 2 设置数据透视表的层次结构。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

另一轮图表 API 可更好地对图表元素进行编程控制。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
applicationapplication 方法 > createWorkbook(base64File: string)Method > createWorkbook(base64File: string) 使用可选 base64 编码的 .xlsx 文件创建新的隐藏工作簿。Creates a new hidden workbook by using an optional base64 encoded .xlsx file. 1.81.8
basicDataValidationbasicDataValidation 属性 > formula1Property > formula1 获取或设置 Formula1,即最小值或取决于运算符的值。Gets or sets the Formula1, i.e. minimum value or value depending of the operator. 1.81.8
basicDataValidationbasicDataValidation 属性 > formula2Property > formula2 获取或设置 Formula2,即最大值或取决于运算符的值。Gets or sets the Formula2, i.e. maximum value or value depending of the operator. 1.81.8
basicDataValidationbasicDataValidation 关系 > operatorRelationship > operator 用于验证数据有效性的运算符。The operator to use for validating the data. 1.81.8
chartchart 属性 > categoryLabelLevelProperty > categoryLabelLevel 返回或设置 ChartCategoryLabelLevel 枚举常量,该常量代表分类标签源自位置的级别。Returns or sets a ChartCategoryLabelLevel enumeration constant referring to the level of where the category labels are being sourced from. 读/写。Read/Write. 1.81.8
chartchart 属性 > plotVisibleOnlyProperty > plotVisibleOnly 如果仅绘制可见单元格,则为 True。True if only visible cells are plotted. 如果绘制可见单元格和隐藏单元格,则为 False。False if both visible and hidden cells are plotted. 读写。ReadWrite. 1.81.8
chartchart 属性 > seriesNameLevelProperty > seriesNameLevel 返回或设置 ChartSeriesNameLevel 枚举常量,该常量代表系列名称源自位置的级别。Returns or sets a ChartSeriesNameLevel enumeration constant referring to the level of where the series names are being sourced from. 读/写。Read/Write. 1.81.8
chartchart 属性 > showDataLabelsOverMaximumProperty > showDataLabelsOverMaximum 表示当值大于数值轴上的最大值时是否显示数据标签。Represents whether to show the data labels when the value is greater than the maximum value on the value axis. 1.81.8
chartchart 属性 > styleProperty > style 返回或设置图表的图表样式。Returns or sets the chart style for the chart. 读写。ReadWrite. 1.81.8
chartchart 关系 > displayBlanksAsRelationship > displayBlanksAs 返回或设置图表上的空白单元格的绘制方式。Returns or sets the way that blank cells are plotted on a chart. 读写。ReadWrite. 1.81.8
chartchart 关系 > plotAreaRelationship > plotArea 表示图表的绘制区域。Represents the plotArea for the chart. 只读。Read-only. 1.81.8
chartchart 关系 > plotByRelationship > plotBy 返回或设置图表上的列或行用作数据系列的方式。Returns or sets the way columns or rows are used as data series on the chart. 读写。ReadWrite. 1.81.8
chartActivatedEventArgschartActivatedEventArgs 属性 > chartIdProperty > chartId 获取已启用图表的 ID。Gets the id of the chart that is activated. 1.81.8
chartActivatedEventArgschartActivatedEventArgs 属性 > typeProperty > type 获取事件的类型。Gets the type of the event. 1.81.8
chartActivatedEventArgschartActivatedEventArgs 属性 > worksheetIdProperty > worksheetId 获取其中的图表已启用的工作表的 ID。Gets the id of the worksheet in which the chart is activated. 1.81.8
chartAddedEventArgschartAddedEventArgs 属性 > chartIdProperty > chartId 获取已添加至工作表的图表的 ID。Gets the id of the chart that is added to the worksheet. 1.81.8
chartAddedEventArgschartAddedEventArgs 属性 > typeProperty > type 获取事件的类型。Gets the type of the event. 1.81.8
chartAddedEventArgschartAddedEventArgs 属性 > worksheetIdProperty > worksheetId 获取已在其中添加图表的工作表的 ID。Gets the id of the worksheet in which the chart is added. 1.81.8
chartAddedEventArgschartAddedEventArgs 关系 > sourceRelationship > source 获取事件源。Gets the source of the event. 1.81.8
chartAxischartAxis 属性 > isBetweenCategoriesProperty > isBetweenCategories 表示数值轴是否与分类之间的分类轴交叉。Represents whether value axis crosses the category axis between categories. 1.81.8
chartAxischartAxis 属性 > multiLevelProperty > multiLevel 表示是否为多级轴。Represents whether an axis is multilevel or not. 1.81.8
chartAxischartAxis 属性 > numberFormatProperty > numberFormat 表示轴刻度线标签的格式代码。Represents the format code for the axis tick label. 1.81.8
chartAxischartAxis 属性 > offsetProperty > offset 表示不同标签级别之间的距离以及一级标签和轴线之间的距离。Represents the distance between the levels of labels, and the distance between the first level and the axis line. 此值应该是 0 到 1000 之间的整数。The value should be an integer from 0 to 1000. 1.81.8
chartAxischartAxis 属性 > positionAtProperty > positionAt 表示两轴交叉的特定轴位置。Represents the specified axis position where the other axis crosses at. 应使用 SetPositionAt(double) 方法设置此属性。You should use the SetPositionAt(double) method to set this property. 只读。Read-only. 1.81.8
chartAxischartAxis 属性 > textOrientationProperty > textOrientation 表示轴刻度线标签的文本方向。Represents the text orientation of the axis tick label. 此值应是 -90 到 90 或 180(垂直文本)之间的整数。The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. 1.81.8
chartAxischartAxis 关系 > alignmentRelationship > alignment 表示指定轴刻度线标签的对齐方式。Represents the alignment for the specified axis tick label. 1.81.8
chartAxischartAxis 关系 > positionRelationship > position 表示两轴交叉的特定轴位置。Represents the specified axis position where the other axis crosses. 1.81.8
chartAxischartAxis 方法 > setPositionAt(value: double)Method > setPositionAt(value: double) 设置两轴交叉的特定轴位置。Set the specified axis position where the other axis crosses at. 1.81.8
chartAxisFormatchartAxisFormat 关系 > fillRelationship > fill 表示图表填充格式。Represents chart fill formatting. 只读。Read-only. 1.81.8
chartAxisTitlechartAxisTitle 方法 > setFormula(formula: string)Method > setFormula(formula: string) 该字符串值表示采用 A1 表示法的图表轴标题的公式。A string value that represents the formula of chart axis title using A1-style notation. 1.81.8
chartAxisTitleFormatchartAxisTitleFormat 关系 > borderRelationship > border 表示边框格式,包括颜色、线条样式和粗细。Represents the border format, which includes color, linestyle, and weight. 只读。Read-only. 1.81.8
chartAxisTitleFormatchartAxisTitleFormat 关系 > fillRelationship > fill 表示图表填充格式。Represents chart fill formatting. 只读。Read-only. 1.81.8
chartBorderchartBorder 方法 > clear()Method > clear() 清除图表元素的边框格式。Clear the border format of a chart element. 1.81.8
chartDataLabelchartDataLabel 属性 > autoTextProperty > autoText 该布尔值表示数据标签是否根据上下文自动生成相应的文本。Boolean value representing if data label automatically generates appropriate text based on context. 1.81.8
chartDataLabelchartDataLabel 属性 > formulaProperty > formula 该字符串值表示采用 A1 表示法的图表数据标签的公式。String value that represents the formula of chart data label using A1-style notation. 1.81.8
chartDataLabelchartDataLabel 属性 > heightProperty > height 返回图表数据标签的高度,以磅为单位。Returns the height, in points, of the chart data label. 只读。Read-only. 如果图表数据标签不可见,则为 Null。Null if chart data label is not visible. 只读。Read-only. 1.81.8
chartDataLabelchartDataLabel 属性 > leftProperty > left 表示图表数据标签左边缘到图表区域左边缘的距离,以磅为单位。Represents the distance, in points, from the left edge of chart data label to the left edge of chart area. 如果图表数据标签不可见,则为 Null。Null if chart data label is not visible. 1.81.8
chartDataLabelchartDataLabel 属性 > numberFormatProperty > numberFormat 该字符串值表示数据标签的格式代码。String value that represents the format code for data label. 1.81.8
chartDataLabelchartDataLabel 属性 > textProperty > text 该字符串表示图表上的数据标签文本。String representing the text of the data label on a chart. 1.81.8
chartDataLabelchartDataLabel 属性 > textOrientationProperty > textOrientation 表示图表数据标签的文本方向。Represents the text orientation of chart data label. 此值应是 -90 到 90 或 180(垂直文本)之间的整数。The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. 1.81.8
chartDataLabelchartDataLabel 属性 > topProperty > top 表示图表数据标签上边缘到图表区域顶部的距离,以磅为单位。Represents the distance, in points, from the top edge of chart data label to the top of chart area. 如果图表数据标签不可见,则为 Null。Null if chart data label is not visible. 1.81.8
chartDataLabelchartDataLabel 属性 > widthProperty > width 返回图表数据标签的宽度,以磅为单位。Returns the width, in points, of the chart data label. 只读。Read-only. 如果图表数据标签不可见,则为 Null。Null if chart data label is not visible. 只读。Read-only. 1.81.8
chartDataLabelchartDataLabel 关系 > formatRelationship > format 表示图表数据标签的格式。Represents the format of chart data label. 只读。Read-only. 1.81.8
chartDataLabelchartDataLabel 关系 > horizontalAlignmentRelationship > horizontalAlignment 表示图表数据标签水平对齐。Represents the horizontal alignment for chart data label. 1.81.8
chartDataLabelchartDataLabel 关系 > verticalAlignmentRelationship > verticalAlignment 表示图表数据标签垂直对齐。Represents the vertical alignment of chart data label. 1.81.8
chartDataLabelFormatchartDataLabelFormat 关系 > borderRelationship > border 表示边框格式,包括颜色、线条样式和粗细。Represents the border format, which includes color, linestyle, and weight. 只读。Read-only. 1.81.8
chartDataLabelschartDataLabels 属性 > autoTextProperty > autoText 表示数据标签是否根据上下文自动生成相应的文本。Represents whether data labels automatically generate appropriate text based on context. 1.81.8
chartDataLabelschartDataLabels 属性 > numberFormatProperty > numberFormat 表示数据标签的格式代码。Represents the format code for data labels. 1.81.8
chartDataLabelschartDataLabels 属性 > textOrientationProperty > textOrientation 表示数据标签的文本方向。Represents the text orientation of data labels. 此值应是 -90 到 90 或 0 到 180(垂直文本)之间的整数。The value should be an integer either from -90 to 90, or 0 to 180 for vertically-oriented text. 1.81.8
chartDataLabelschartDataLabels 关系 > horizontalAlignmentRelationship > horizontalAlignment 表示图表数据标签水平对齐。Represents the horizontal alignment for chart data label. 1.81.8
chartDataLabelschartDataLabels 关系 > verticalAlignmentRelationship > verticalAlignment 表示图表数据标签垂直对齐。Represents the vertical alignment of chart data label. 1.81.8
chartDeactivatedEventArgschartDeactivatedEventArgs 属性 > chartIdProperty > chartId 获取停用图表的 ID。Gets the id of the chart that is deactivated. 1.81.8
chartDeactivatedEventArgschartDeactivatedEventArgs 属性 > typeProperty > type 获取事件的类型。Gets the type of the event. 1.81.8
chartDeactivatedEventArgschartDeactivatedEventArgs 属性 > worksheetIdProperty > worksheetId 获取其中的图表已停用的工作表的 ID。Gets the id of the worksheet in which the chart is deactivated. 1.81.8
chartDeletedEventArgschartDeletedEventArgs 属性 > chartIdProperty > chartId 获取已从工作表删除的图表的 ID。Gets the id of the chart that is deleted from the worksheet. 1.81.8
chartDeletedEventArgschartDeletedEventArgs 属性 > typeProperty > type 获取事件的类型。Gets the type of the event. 1.81.8
chartDeletedEventArgschartDeletedEventArgs 属性 > worksheetIdProperty > worksheetId 获取已在其中删除图表的工作表的 ID。Gets the id of the worksheet in which the chart is deleted. 1.81.8
chartDeletedEventArgschartDeletedEventArgs 关系 > sourceRelationship > source 获取事件源。Gets the source of the event. 1.81.8
chartLegendEntrychartLegendEntry 属性 > heightProperty > height 表示图表图例上的 legendEntry 的高度。Represents the height of the legendEntry on the chart legend. 只读。Read-only. 1.81.8
chartLegendEntrychartLegendEntry 属性 > indexProperty > index 表示图表图例中的 legendEntry 的索引。Represents the index of the legendEntry in the chart legend. 只读。Read-only. 1.81.8
chartLegendEntrychartLegendEntry 属性 > leftProperty > left 表示图表 legendEntry 的左侧。Represents the left of a chart legendEntry. 只读。Read-only. 1.81.8
chartLegendEntrychartLegendEntry 属性 > topProperty > top 表示图表 legendEntry 的顶部。Represents the top of a chart legendEntry. 只读。Read-only. 1.81.8
chartLegendEntrychartLegendEntry 属性 > widthProperty > width 表示图表图例上的 legendEntry 的宽度。Represents the width of the legendEntry on the chart Legend. 只读。Read-only. 1.81.8
chartLegendFormatchartLegendFormat 关系 > borderRelationship > border 表示边框格式,包括颜色、线条样式和粗细。Represents the border format, which includes color, linestyle, and weight. 只读。Read-only. 1.81.8
chartPlotAreachartPlotArea 属性 > heightProperty > height 表示 plotArea 的高度值。Represents the height value of plotArea. 1.81.8
chartPlotAreachartPlotArea 属性 > insideHeightProperty > insideHeight 表示 plotArea 的 insideHeight 值。Represents the insideHeight value of plotArea. 1.81.8
chartPlotAreachartPlotArea 属性 > insideLeftProperty > insideLeft 表示 plotArea 的 insideLeft 值。Represents the insideLeft value of plotArea. 1.81.8
chartPlotAreachartPlotArea 属性 > insideTopProperty > insideTop 表示 plotArea 的 insideTop 值。Represents the insideTop value of plotArea. 1.81.8
chartPlotAreachartPlotArea 属性 > insideWidthProperty > insideWidth 表示 plotArea 的 insideWidth 值。Represents the insideWidth value of plotArea. 1.81.8
chartPlotAreachartPlotArea 属性 > leftProperty > left 表示 plotArea 的 left 值。Represents the left value of plotArea. 1.81.8
chartPlotAreachartPlotArea 属性 > topProperty > top 表示 plotArea 的 top 值。Represents the top value of plotArea. 1.81.8
chartPlotAreachartPlotArea 属性 > widthProperty > width 表示 plotArea 的宽度值。Represents the width value of plotArea. 1.81.8
chartPlotAreachartPlotArea 关系 > formatRelationship > format 表示图表 plotArea 的格式。Represents the formatting of a chart plotArea. 只读。Read-only. 1.81.8
chartPlotAreachartPlotArea 关系 > positionRelationship > position 表示 plotArea 的位置。Represents the position of plotArea. 1.81.8
chartPlotAreaFormatchartPlotAreaFormat 关系 > borderRelationship > border 表示图表 plotArea 的边框属性。Represents the border attributes of a chart plotArea. 只读。Read-only. 1.81.8
chartPlotAreaFormatchartPlotAreaFormat 关系 > fillRelationship > fill 表示对象的填充格式,包括背景格式信息。只读。Represents the fill format of an object, which includes background formatting information. Read-only. 1.81.8
chartSerieschartSeries 属性 > explosionProperty > explosion 返回或设置饼图或圆环图切片的分解程度值。Returns or sets the explosion value for a pie-chart or doughnut-chart slice. 如果未分解(切片尖端位于饼图中心),则返回 0(零)。Returns 0 (zero) if there's no explosion (the tip of the slice is in the center of the pie). 读写。ReadWrite. 1.81.8
chartSerieschartSeries 属性 > firstSliceAngleProperty > 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. 可以是 0 到 360 之间的值。Can be a value from 0 through 360. 读写ReadWrite 1.81.8
chartSerieschartSeries 属性 > invertIfNegativeProperty > invertIfNegative 如果 Excel 在值为负数时反转项目中的图案,则为 True。True if Microsoft Excel inverts the pattern in the item when it corresponds to a negative number. 读写。ReadWrite. 1.81.8
chartSerieschartSeries 属性 > overlapProperty > overlap 指定条柱的摆放方式。Specifies how bars and columns are positioned. 可以是 -100 到 100 之间的值。Can be a value between -100 and 100. 只适用于二维条形图和二维柱形图。Applies only to 2-D bar and 2-D column charts. 读写。ReadWrite. 1.81.8
chartSerieschartSeries 属性 > secondPlotSizeProperty > 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. 可以是 5 到 200 之间的值。Can be a value from 5 to 200. 读写。ReadWrite. 1.81.8
chartSerieschartSeries 属性 > varyByCategoriesProperty > varyByCategories 如果 Excel 为每个数据标记分配不同的颜色或图案,则为 True。True if Microsoft Excel assigns a different color or pattern to each data marker. 图表必须只包含一个系列。The chart must contain only one series. 读写。ReadWrite. 1.81.8
chartSerieschartSeries 关系 > axisGroupRelationship > axisGroup 返回或设置指定系列的组。读写Returns or sets the group for the specified series. ReadWrite 1.81.8
chartSerieschartSeries 关系 > dataLabelsRelationship > dataLabels 表示系列中所有数据标签的集合。Represents a collection of all dataLabels in the series. 只读。Read-only. 1.81.8
chartSerieschartSeries 关系 > splitTypeRelationship > 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.81.8
chartTrendlinechartTrendline 属性 > backwardPeriodProperty > backwardPeriod 表示趋势线向后延伸的周期数。Represents the number of periods that the trendline extends backward. 1.81.8
chartTrendlinechartTrendline 属性 > forwardPeriodProperty > forwardPeriod 表示趋势线向前延伸的周期数。Represents the number of periods that the trendline extends forward. 1.81.8
chartTrendlinechartTrendline 属性 > showEquationProperty > showEquation 如果图表上显示趋势线公式,则为 True。True if the equation for the trendline is displayed on the chart. 1.81.8
chartTrendlinechartTrendline 属性 > showRSquaredProperty > showRSquared 如果图表上显示趋势线的 R 平方值,则为 True。True if the R-squared for the trendline is displayed on the chart. 1.81.8
chartTrendlinechartTrendline 关系 > labelRelationship > label 表示图表趋势线的标签。Represents the label of a chart trendline. 只读。Read-only. 1.81.8
chartTrendlineLabelchartTrendlineLabel 属性 > autoTextProperty > autoText 该布尔值表示趋势线标签是否根据上下文自动生成相应的文本。Boolean value representing if trendline label automatically generates appropriate text based on context. 1.81.8
chartTrendlineLabelchartTrendlineLabel 属性 > formulaProperty > formula 该字符串值表示采用 A1 表示法的图表趋势线标签的公式。String value that represents the formula of chart trendline label using A1-style notation. 1.81.8
chartTrendlineLabelchartTrendlineLabel 属性 > heightProperty > height 返回图表趋势线标签的高度,以磅为单位。Returns the height, in points, of the chart trendline label. 只读。Read-only. 如果图表趋势线标签不可见,则为 Null。Null if chart trendline label is not visible. 只读。Read-only. 1.81.8
chartTrendlineLabelchartTrendlineLabel 属性 > leftProperty > left 表示图表趋势线标签左边缘到图表区域左边缘的距离,以磅为单位。Represents the distance, in points, from the left edge of chart trendline label to the left edge of chart area. 如果图表趋势线标签不可见,则为 Null。Null if chart trendline label is not visible. 1.81.8
chartTrendlineLabelchartTrendlineLabel 属性 > numberFormatProperty > numberFormat 该字符串值表示趋势线标签的格式代码。String value that represents the format code for trendline label. 1.81.8
chartTrendlineLabelchartTrendlineLabel 属性 > textProperty > text 该字符串表示图表上的趋势线标签文本。String representing the text of the trendline label on a chart. 1.81.8
chartTrendlineLabelchartTrendlineLabel 属性 > textOrientationProperty > textOrientation 表示图表趋势线标签的文本方向。Represents the text orientation of chart trendline label. 此值应是 -90 到 90 或 180(垂直文本)之间的整数。The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. 1.81.8
chartTrendlineLabelchartTrendlineLabel 属性 > topProperty > top 表示图表趋势线标签上边缘到图表区域顶部的距离,以磅为单位。Represents the distance, in points, from the top edge of chart trendline label to the top of chart area. 如果图表趋势线标签不可见,则为 Null。Null if chart trendline label is not visible. 1.81.8
chartTrendlineLabelchartTrendlineLabel 属性 > widthProperty > width 返回图表趋势线标签的宽度,以磅为单位。Returns the width, in points, of the chart trendline label. 只读。Read-only. 如果图表趋势线标签不可见,则为 Null。Null if chart trendline label is not visible. 只读。Read-only. 1.81.8
chartTrendlineLabelchartTrendlineLabel 关系 > formatRelationship > format 表示图表趋势线标签的格式。Represents the format of chart trendline label. 只读。Read-only. 1.81.8
chartTrendlineLabelchartTrendlineLabel 关系 > horizontalAlignmentRelationship > horizontalAlignment 表示图表趋势线标签水平对齐。Represents the horizontal alignment for chart trendline label. 1.81.8
chartTrendlineLabelchartTrendlineLabel 关系 > verticalAlignmentRelationship > verticalAlignment 表示图表趋势线标签垂直对齐。Represents the vertical alignment of chart trendline label. 1.81.8
chartTrendlineLabelFormatchartTrendlineLabelFormat 关系 > borderRelationship > border 表示边框格式,包括颜色、线条样式和粗细。Represents the border format, which includes color, linestyle, and weight. 只读。Read-only. 1.81.8
chartTrendlineLabelFormatchartTrendlineLabelFormat 关系 > fillRelationship > fill 表示当前图表趋势线标签的填充格式。Represents the fill format of the current chart trendline label. 只读。Read-only. 1.81.8
chartTrendlineLabelFormatchartTrendlineLabelFormat 关系 > fontRelationship > font 表示图表趋势线标签的字体属性(字体名称、字体大小、颜色等)。Represents the font attributes (font name, font size, color, etc.) for a chart trendline label. 只读。Read-only. 1.81.8
customDataValidationcustomDataValidation 属性 > formulaProperty > 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.81.8
dataPivotHierarchydataPivotHierarchy 属性 > idProperty > id DataPivotHierarchy ID。Id of the DataPivotHierarchy. 只读。Read-only. 1.81.8
dataPivotHierarchydataPivotHierarchy 属性 > nameProperty > name DataPivotHierarchy 的名称。Name of the DataPivotHierarchy. 1.81.8
dataPivotHierarchydataPivotHierarchy 属性 > numberFormatProperty > numberFormat DataPivotHierarchy 的数字格式。Number format of the DataPivotHierarchy. 1.81.8
dataPivotHierarchydataPivotHierarchy 属性 > positionProperty > position DataPivotHierarchy 的位置。Position of the DataPivotHierarchy. 1.81.8
dataPivotHierarchydataPivotHierarchy 关系 > fieldRelationship > field 返回与 DataPivotHierarchy 相关联的 PivotFields。Returns the PivotFields associated with the DataPivotHierarchy. 只读。Read-only. 1.81.8
dataPivotHierarchydataPivotHierarchy 关系 > showAsRelationship > showAs 确定数据是否应显示为特定计算汇总。Determines whether the data should be shown as a specific summary calculation or not. 1.81.8
dataPivotHierarchydataPivotHierarchy 关系 > summarizeByRelationship > summarizeBy 确定是否显示 DataPivotHierarchy 的所有项。Determines whether to show all items of the DataPivotHierarchy. 1.81.8
dataPivotHierarchydataPivotHierarchy 方法 > setToDefault()Method > setToDefault() 将 DataPivotHierarchy 重置回其默认值。Reset the DataPivotHierarchy back to its default values. 1.81.8
dataPivotHierarchyCollectiondataPivotHierarchyCollection 属性 > itemsProperty > items DataPivotHierarchy 对象的集合。A collection of dataPivotHierarchy objects. 只读。Read-only. 1.81.8
dataPivotHierarchyCollectiondataPivotHierarchyCollection 方法 > add(pivotHierarchy: PivotHierarchy)Method > add(pivotHierarchy: PivotHierarchy) 将 PivotHierarchy 添加到当前轴。Adds the PivotHierarchy to the current axis. 1.81.8
dataPivotHierarchyCollectiondataPivotHierarchyCollection 方法 > getCount()Method > getCount() 获取集合中的透视层级结构的数量。Gets the number of pivot hierarchies in the collection. 1.81.8
dataPivotHierarchyCollectiondataPivotHierarchyCollection 方法 > getItem(name: string)Method > getItem(name: string) 按名称或 ID 获取 DataPivotHierarchy。Gets a DataPivotHierarchy by its name or id. 1.81.8
dataPivotHierarchyCollectiondataPivotHierarchyCollection 方法 > getItemOrNullObject(name: string)Method > getItemOrNullObject(name: string) 按名称获取 DataPivotHierarchy。Gets a DataPivotHierarchy by name. 如果 DataPivotHierarchy 不存在,则返回 Null 对象。If the DataPivotHierarchy does not exist, will return a null object. 1.81.8
dataPivotHierarchyCollectiondataPivotHierarchyCollection 方法 > remove(DataPivotHierarchy: DataPivotHierarchy)Method > remove(DataPivotHierarchy: DataPivotHierarchy) 从当前轴删除 PivotHierarchy。Removes the PivotHierarchy from the current axis. 1.81.8
dataValidationdataValidation 属性 > ignoreBlanksProperty > ignoreBlanks 忽略空白:不会对空白单元格执行数据严重,默认为 true。Ignore blanks: no data validation will be performed on blank cells, it defaults to true. 1.81.8
dataValidationdataValidation 属性 > validProperty > valid 表示所有单元格值根据数据有效性规则是否全部有效。Represents if all cell values are valid according to the data validation rules. 只读。Read-only. 1.81.8
dataValidationdataValidation 关系 > errorAlertRelationship > errorAlert 用户输入无效数据时,出现错误警报。Error alert when user enters invalid data. 1.81.8
dataValidationdataValidation 关系 > promptRelationship > prompt 用户选择某个单元格时进行提示。Prompt when users selects a cell. 1.81.8
dataValidationdataValidation 关系 > ruleRelationship > rule 包含不同类型的数据有效性标准的数据有效性规则。Data validation rule that contains different types of data validation criteria. 1.81.8
dataValidationdataValidation 关系 > typeRelationship > type 数据有效性类型,有关详细信息,请参阅 Excel.DataValidationTypeType of the data validation, see Excel.DataValidationType for details. 只读。Read-only. 1.81.8
dataValidationdataValidation 方法 > clear()Method > clear() 清除当前区域中的数据有效性。Clears the data validation from the current range. 1.81.8
dataValidationErrorAlertdataValidationErrorAlert 属性 > messageProperty > message 表示错误警报消息。Represents error alert message. 1.81.8
dataValidationErrorAlertdataValidationErrorAlert 属性 > showAlertProperty > showAlert 确定在用户输入无效数据时是否显示错误警报对话框。Determines whether to show an error alert dialog or not when a user enters invalid data. 默认值为 true。The default is true. 1.81.8
dataValidationErrorAlertdataValidationErrorAlert 属性 > titleProperty > title 表示错误警报对话框标题。Represents error alert dialog title. 1.81.8
dataValidationErrorAlertdataValidationErrorAlert 关系 > styleRelationship > style 表示数据有效性警报类型,有关详细信息,请参阅 Excel.DataValidationAlertStyleRepresents data validation alert type, please see Excel.DataValidationAlertStyle for details. 1.81.8
dataValidationPromptdataValidationPrompt 属性 > messageProperty > message 表示提示消息。Represents the message of the prompt. 1.81.8
dataValidationPromptdataValidationPrompt 属性 > showPromptProperty > showPrompt 确定在用户选择具有数据有效性的单元格时是否显示提示。Determines whether or not to show the prompt when user selects a cell with data validation. 1.81.8
dataValidationPromptdataValidationPrompt 属性 > titleProperty > title 表示提示标题。Represents the title for the prompt. 1.81.8
dataValidationRuledataValidationRule 关系 > customRelationship > custom 自定义数据有效性条件。Custom data validation criteria. 1.81.8
dataValidationRuledataValidationRule 关系 > dateRelationship > date 日期数据有效性条件。Date data validation criteria. 1.81.8
dataValidationRuledataValidationRule 关系 > decimalRelationship > decimal 小数数据有效性条件。Decimal data validation criteria. 1.81.8
dataValidationRuledataValidationRule 关系 > listRelationship > list 列表数据有效性条件。List data validation criteria. 1.81.8
dataValidationRuledataValidationRule 关系 > textLengthRelationship > textLength TextLength 数据有效性条件。TextLength data validation criteria. 1.81.8
dataValidationRuledataValidationRule 关系 > timeRelationship > time 时间数据有效性条件。Time data validation criteria. 1.81.8
dataValidationRuledataValidationRule 关系 > wholeNumberRelationship > wholeNumber WholeNumber 数据有效性条件。WholeNumber data validation criteria. 1.81.8
dateTimeDataValidationdateTimeDataValidation 属性 > formula1Property > formula1 获取或设置 Formula1,即最小值或取决于运算符的值。Gets or sets the Formula1, i.e. minimum value or value depending on the operator. 1.81.8
dateTimeDataValidationdateTimeDataValidation 属性 > formula2Property > formula2 获取或设置 Formula2,即最大值或取决于运算符的值。Gets or sets the Formula2, i.e. maximum value or value depending on the operator. 1.81.8
dateTimeDataValidationdateTimeDataValidation 关系 > operatorRelationship > operator 用于验证数据有效性的运算符。The operator to use for validating the data. 1.81.8
filterPivotHierarchyfilterPivotHierarchy 属性 > enableMultipleFilterItemsProperty > enableMultipleFilterItems 确定是否允许多个筛选项。Determines whether to allow multiple filter items. 1.81.8
filterPivotHierarchyfilterPivotHierarchy 属性 > idProperty > id FilterPivotHierarchy 的 ID。Id of the FilterPivotHierarchy. 只读。Read-only. 1.81.8
filterPivotHierarchyfilterPivotHierarchy 属性 > nameProperty > name FilterPivotHierarchy 的名称。Name of the FilterPivotHierarchy. 1.81.8
filterPivotHierarchyfilterPivotHierarchy 属性 > positionProperty > position FilterPivotHierarchy 的位置。Position of the FilterPivotHierarchy. 1.81.8
filterPivotHierarchyfilterPivotHierarchy 关系 > fieldsRelationship > fields 返回与 FilterPivotHierarchy 相关联的 PivotFields。Returns the PivotFields associated with the FilterPivotHierarchy. 只读。Read-only. 1.81.8
filterPivotHierarchyfilterPivotHierarchy 方法 > setToDefault()Method > setToDefault() 将 FilterPivotHierarchy 重置回其默认值。Reset the FilterPivotHierarchy back to its default values. 1.81.8
filterPivotHierarchyCollectionfilterPivotHierarchyCollection 属性 > itemsProperty > items FilterPivotHierarchy 对象的集合。A collection of filterPivotHierarchy objects. 只读。Read-only. 1.81.8
filterPivotHierarchyCollectionfilterPivotHierarchyCollection 方法 > add(pivotHierarchy: PivotHierarchy)Method > add(pivotHierarchy: 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.81.8
filterPivotHierarchyCollectionfilterPivotHierarchyCollection 方法 > getCount()Method > getCount() 获取集合中的透视层级结构的数量。Gets the number of pivot hierarchies in the collection. 1.81.8
filterPivotHierarchyCollectionfilterPivotHierarchyCollection 方法 > getItem(name: string)Method > getItem(name: string) 按名称或 ID 获取 FilterPivotHierarchy。Gets a FilterPivotHierarchy by its name or id. 1.81.8
filterPivotHierarchyCollectionfilterPivotHierarchyCollection 方法 > getItemOrNullObject(name: string)Method > getItemOrNullObject(name: string) 按名称获取 FilterPivotHierarchy。Gets a FilterPivotHierarchy by name. 如果 FilterPivotHierarchy 不存在,则返回 Null 对象。If the FilterPivotHierarchy does not exist, will return a null object. 1.81.8
filterPivotHierarchyCollectionfilterPivotHierarchyCollection 方法 > remove(filterPivotHierarchy: FilterPivotHierarchy)Method > remove(filterPivotHierarchy: FilterPivotHierarchy) 从当前轴删除 PivotHierarchy。Removes the PivotHierarchy from the current axis. 1.81.8
listDataValidationlistDataValidation 属性 > inCellDropDownProperty > inCellDropDown 是否显示单元格下拉菜单中的列表,默认为 true。Displays the list in cell drop down or not, it defaults to true. 1.81.8
listDataValidationlistDataValidation 属性 > sourceProperty > source 数据有效性列表源Source of the list for data validation 1.81.8
pivotFieldpivotField 属性 > idProperty > id PivotField 的 ID。Id of the PivotField. 只读。Read-only. 1.81.8
pivotFieldpivotField 属性 > nameProperty > name PivotField 的名称。Name of the PivotField. 1.81.8
pivotFieldpivotField 属性 > showAllItemsProperty > showAllItems 确定是否显示 PivotField 的所有项。Determines whether to show all items of the PivotField. 1.81.8
pivotFieldpivotField 关系 > itemsRelationship > items 返回与 PivotField 相关联的 PivotFields。Returns the PivotFields associated with the PivotField. 只读。Read-only. 1.81.8
pivotFieldpivotField 关系 > subtotalsRelationship > subtotals PivotField 小计。Subtotals of the PivotField. 1.81.8
pivotFieldpivotField 方法 > sortByLabels(sortby: SortBy)Method > sortByLabels(sortby: SortBy) PivotField 排序。Sorts the PivotField. 如果指定 DataPivotHierarchy,则会基于它进行排序,如果未指定,则会基于 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.81.8
pivotFieldCollectionpivotFieldCollection 属性 > itemsProperty > items pivotField 对象的集合。A collection of pivotField objects. 只读。Read-only. 1.81.8
pivotFieldCollectionpivotFieldCollection 方法 > getCount()Method > getCount() 获取集合中的透视层级结构的数量。Gets the number of pivot hierarchies in the collection. 1.81.8
pivotFieldCollectionpivotFieldCollection 方法 > getItem(name: string)Method > getItem(name: string) 按名称或 ID 获取 PivotHierarchy。Gets a PivotHierarchy by its name or id. 1.81.8
pivotFieldCollectionpivotFieldCollection 方法 > getItemOrNullObject(name: string)Method > getItemOrNullObject(name: string) 按名称获取 PivotHierarchy。Gets a PivotHierarchy by name. 如果 PivotHierarchy 不存在,则返回 Null 对象。If the PivotHierarchy does not exist, will return a null object. 1.81.8
pivotHierarchypivotHierarchy 属性 > idProperty > id PivotHierarchy 的 ID。Id of the PivotHierarchy. 只读。Read-only. 1.81.8
pivotHierarchypivotHierarchy 属性 > nameProperty > name PivotHierarchy 的名称。Name of the PivotHierarchy. 1.81.8
pivotHierarchypivotHierarchy 关系 > fieldsRelationship > fields 返回与 PivotHierarchy 相关联的 PivotFields。Returns the PivotFields associated with the PivotHierarchy. 只读。Read-only. 1.81.8
pivotHierarchyCollectionpivotHierarchyCollection 属性 > itemsProperty > items PivotHierarchy 对象的集合。A collection of pivotHierarchy objects. 只读。Read-only. 1.81.8
pivotHierarchyCollectionpivotHierarchyCollection 方法 > getCount()Method > getCount() 获取集合中的透视层级结构的数量。Gets the number of pivot hierarchies in the collection. 1.81.8
pivotHierarchyCollectionpivotHierarchyCollection 方法 > getItem(name: string)Method > getItem(name: string) 按名称或 ID 获取 PivotHierarchy。Gets a PivotHierarchy by its name or id. 1.81.8
pivotHierarchyCollectionpivotHierarchyCollection 方法 > getItemOrNullObject(name: string)Method > getItemOrNullObject(name: string) 按名称获取 PivotHierarchy。Gets a PivotHierarchy by name. 如果 PivotHierarchy 不存在,则返回 Null 对象。If the PivotHierarchy does not exist, will return a null object. 1.81.8
pivotItempivotItem 属性 > idProperty > id PivotItem 的 ID。Id of the PivotItem. 只读。Read-only. 1.81.8
pivotItempivotItem 属性 > isExpandedProperty > isExpanded 确定是展开项以显示子项还是折叠项并隐藏子项。Determines whether the item is expanded to show child items or if it's collapsed and child items are hidden. 1.81.8
pivotItempivotItem 属性 > nameProperty > name PivotItem 的名称。Name of the PivotItem. 1.81.8
pivotItempivotItem 属性 > visibleProperty > visible 确定 PivotItem 是否可见。Determines whether the PivotItem is visible or not. 1.81.8
pivotItemCollectionpivotItemCollection 属性 > itemsProperty > items pivotItem 对象的集合。A collection of pivotItem objects. 只读。Read-only. 1.81.8
pivotItemCollectionpivotItemCollection 方法 > getCount()Method > getCount() 获取集合中的透视层级结构的数量。Gets the number of pivot hierarchies in the collection. 1.81.8
pivotItemCollectionpivotItemCollection 方法 > getItem(name: string)Method > getItem(name: string) 按名称或 ID 获取 PivotHierarchy。Gets a PivotHierarchy by its name or id. 1.81.8
pivotItemCollectionpivotItemCollection 方法 > getItemOrNullObject(name: string)Method > getItemOrNullObject(name: string) 按名称获取 PivotHierarchy。Gets a PivotHierarchy by name. 如果 PivotHierarchy 不存在,则返回 Null 对象。If the PivotHierarchy does not exist, will return a null object. 1.81.8
pivotLayoutpivotLayout 属性 > showColumnGrandTotalsProperty > showColumnGrandTotals 如果数据透视表显示列总计,则为 True。True if the PivotTable report shows grand totals for columns. 1.81.8
pivotLayoutpivotLayout 属性 > showRowGrandTotalsProperty > showRowGrandTotals 如果数据透视表显示行总计,则为 True。True if the PivotTable report shows grand totals for rows. 1.81.8
pivotLayoutpivotLayout 属性 > subtotalLocationProperty > subtotalLocation 此属性指示数据透视表上的所有字段的 SubtotalLocationType。This property indicates the SubtotalLocationType of all fields on the PivotTable. 如果字段状态不同,则为 null。If fields have different states, this will be null. 可能的值包括:AtTop、AtBottom。Possible values are: AtTop, AtBottom. 1.81.8
pivotLayoutpivotLayout 关系 > layoutTypeRelationship > layoutType 此属性指示数据透视表上的所有字段的 PivotLayoutType。This property indicates the PivotLayoutType of all fields on the PivotTable. 如果字段状态不同,则为 null。If fields have different states, this will be null. 1.81.8
pivotLayoutpivotLayout 方法 > getColumnLabelRange()Method > getColumnLabelRange() 返回数据透视表列标签所在位置的区域。Returns the range where the PivotTable's column labels reside. 1.81.8
pivotLayoutpivotLayout 方法 > getDataBodyRange()Method > getDataBodyRange() 返回数据透视表数据值所在位置的区域。Returns the range where the PivotTable's data values reside. 1.81.8
pivotLayoutpivotLayout 方法 > getFilterAxisRange()Method > getFilterAxisRange() 返回数据透视表筛选区的区域。Returns the range of the PivotTable's filter area. 1.81.8
pivotLayoutpivotLayout 方法 > getRange()Method > getRange() 返回存在数据透视表的区域,不包括筛选区。Returns the range the PivotTable exists on, excluding the filter area. 1.81.8
pivotLayoutpivotLayout 方法 > getRowLabelRange()Method > getRowLabelRange() 返回数据透视表行标签所在位置的区域。Returns the range where the PivotTable's row labels reside. 1.81.8
pivotTablepivotTable 关系 > columnHierarchiesRelationship > columnHierarchies 数据透视表的列透视层级结构。The Column Pivot Hierarchies of the PivotTable. 只读。Read-only. 1.81.8
pivotTablepivotTable 关系 > dataHierarchiesRelationship > dataHierarchies 数据透视表的数据透视层级结构。The Data Pivot Hierarchies of the PivotTable. 只读。Read-only. 1.81.8
pivotTablepivotTable 关系 > filterHierarchiesRelationship > filterHierarchies 数据透视表的筛选器透视层级结构。The Filter Pivot Hierarchies of the PivotTable. 只读。Read-only. 1.81.8
pivotTablepivotTable 关系 > hierarchiesRelationship > hierarchies 数据透视表的透视层级结构。The Pivot Hierarchies of the PivotTable. 只读。Read-only. 1.81.8
pivotTablepivotTable 关系 > layoutRelationship > layout PivotLayout,用于说明数据透视表的布局和可视化结构。The PivotLayout describing the layout and visual structure of the PivotTable. 只读。Read-only. 1.81.8
pivotTablepivotTable 关系 > rowHierarchiesRelationship > rowHierarchies 数据透视表的行透视层级结构。The Row Pivot Hierarchies of the PivotTable. 只读。Read-only. 1.81.8
pivotTablepivotTable 方法 > delete()Method > delete() 删除 PivotTable 对象。Deletes the PivotTable. 1.81.8
pivotTableCollectionpivotTableCollection 方法 > add(name: string, source: object, destination: object)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.81.8
rangerange 关系 > dataValidationRelationship > dataValidation 返回数据有效性对象。Returns a data validation object. 只读。Read-only. 1.81.8
rowColumnPivotHierarchyrowColumnPivotHierarchy 属性 > idProperty > id RowColumnPivotHierarchy 的 ID。Id of the RowColumnPivotHierarchy. 只读。Read-only. 1.81.8
rowColumnPivotHierarchyrowColumnPivotHierarchy 属性 > nameProperty > name RowColumnPivotHierarchy 的名称。Name of the RowColumnPivotHierarchy. 1.81.8
rowColumnPivotHierarchyrowColumnPivotHierarchy 属性 > positionProperty > position RowColumnPivotHierarchy 的位置。Position of the RowColumnPivotHierarchy. 1.81.8
rowColumnPivotHierarchyrowColumnPivotHierarchy 关系 > fieldsRelationship > fields 返回与 RowColumnPivotHierarchy 相关联的 PivotFields。Returns the PivotFields associated with the RowColumnPivotHierarchy. 只读。Read-only. 1.81.8
rowColumnPivotHierarchyrowColumnPivotHierarchy 方法 > setToDefault()Method > setToDefault() 将 RowColumnPivotHierarchy 重置回其默认值。Reset the RowColumnPivotHierarchy back to its default values. 1.81.8
rowColumnPivotHierarchyCollectionrowColumnPivotHierarchyCollection 属性 > itemsProperty > items RowColumnPivotHierarchy 对象的集合。A collection of rowColumnPivotHierarchy objects. 只读。Read-only. 1.81.8
rowColumnPivotHierarchyCollectionrowColumnPivotHierarchyCollection 方法 > add(pivotHierarchy: PivotHierarchy)Method > add(pivotHierarchy: PivotHierarchy) 将 PivotHierarchy 添加到当前轴。Adds the PivotHierarchy to the current axis. 行和列上的其他位置是否存在层次结构。If the hierarchy is present elsewhere on the row, column, 1.81.8
rowColumnPivotHierarchyCollectionrowColumnPivotHierarchyCollection 方法 > getCount()Method > getCount() 获取集合中的透视层级结构的数量。Gets the number of pivot hierarchies in the collection. 1.81.8
rowColumnPivotHierarchyCollectionrowColumnPivotHierarchyCollection 方法 > getItem(name: string)Method > getItem(name: string) 按名称或 ID 获取 RowColumnPivotHierarchy。Gets a RowColumnPivotHierarchy by its name or id. 1.81.8
rowColumnPivotHierarchyCollectionrowColumnPivotHierarchyCollection 方法 > getItemOrNullObject(name: string)Method > getItemOrNullObject(name: string) 按名称获取 RowColumnPivotHierarchy。Gets a RowColumnPivotHierarchy by name. 如果 RowColumnPivotHierarchy 不存在,则返回 Null 对象。If the RowColumnPivotHierarchy does not exist, will return a null object. 1.81.8
rowColumnPivotHierarchyCollectionrowColumnPivotHierarchyCollection 方法 > remove(rowColumnPivotHierarchy: RowColumnPivotHierarchy)Method > remove(rowColumnPivotHierarchy: RowColumnPivotHierarchy) 从当前轴删除 PivotHierarchy。Removes the PivotHierarchy from the current axis. 1.81.8
runtimeruntime 属性 > enableEventsProperty > enableEvents 切换当前任务窗格或内容加载项中的 JavaScript 事件。Toggle JavaScript events in the current taskpane or content add-in. 1.81.8
showAsRuleshowAsRule 关系 > baseFieldRelationship > baseField 基于 ShowAs 计算的基础 PivotField,如适用,基于 ShowAsCalculation 类型,否则为 null。The base PivotField to base the ShowAs calculation, if applicable based on the ShowAsCalculation type, else null. 1.81.8
showAsRuleshowAsRule 关系 > baseItemRelationship > baseItem 基于 ShowAs 计算的基础 Item,如适用,基于 ShowAsCalculation 类型,否则为 null。The base Item to base the ShowAs calculation on, if applicable based on the ShowAsCalculation type, else null. 1.81.8
showAsRuleshowAsRule 关系 > calculationRelationship > calculation 数据 PivotField 使用的 ShowAs 计算。The ShowAs Calculation to use for the Data PivotField. 1.81.8
stylestyle 属性 > autoIndentProperty > autoIndent 指示将单元格中的文本对齐方式设为相等分布时文本是否会自动缩进。Indicates if text is automatically indented when the text alignment in a cell is set to equal distribution. 1.81.8
stylestyle 属性 > textOrientationProperty > textOrientation 此样式中的文本方向。The text orientation for the style. 1.81.8
subtotalssubtotals 属性 > automaticProperty > automatic 如果将“Automatic”设为 true,则在设置 Subtotals 时,所有其他值均会被忽略。If Automatic is set to true, then all other values will be ignored when setting the Subtotals. 1.81.8
subtotalssubtotals 属性 > averageProperty > average 1.81.8
subtotalssubtotals 属性 > countProperty > count 1.81.8
subtotalssubtotals 属性> countNumbersProperty > countNumbers 1.81.8
subtotalssubtotals 属性 > maxProperty > max 1.81.8
subtotalssubtotals 属性 > minProperty > min 1.81.8
subtotalssubtotals 属性 > productProperty > product 1.81.8
subtotalssubtotals 属性 > standardDeviationProperty > standardDeviation 1.81.8
subtotalssubtotals 属性 > standardDeviationPProperty > standardDeviationP 1.81.8
subtotalssubtotals 属性 > sumProperty > sum 1.81.8
subtotalssubtotals 属性 > varianceProperty > variance 1.81.8
subtotalssubtotals 属性 > variancePProperty > varianceP 1.81.8
tabletable 属性 > legacyIdProperty > legacyId 返回数字 ID。只读。Returns a numeric id. Read-only. 1.81.8
workbookworkbook 属性 > readOnlyProperty > readOnly 如果在只读模式下打开工作簿,则为 True。True if the workbook is open in Read-only mode. 只读。Read-only. 1.81.8
workbookCreatedworkbookCreated 属性 > idProperty > id 返回用于唯一标识 WorkbookCreated 对象的值。Returns a value that uniquely identifies the WorkbookCreated object. 只读。Read-only. 1.81.8
workbookCreatedworkbookCreated 方法 > open()Method > open() 打开工作表。Open the workbook. 1.81.8
worksheetworksheet 属性 > showGridlinesProperty > showGridlines 获取或设置工作表的网格线标志。Gets or sets the worksheet's gridlines flag. 1.81.8
worksheetworksheet 属性 > showHeadingsProperty > showHeadings 获取或设置工作表的标题标志。Gets or sets the worksheet's headings flag. 1.81.8
worksheetCalculatedEventArgsworksheetCalculatedEventArgs 属性 > typeProperty > type 获取事件的类型。Gets the type of the event. 1.81.8
worksheetCalculatedEventArgsworksheetCalculatedEventArgs 属性 > worksheetIdProperty > worksheetId 获取计算的工作表的 ID。Gets the id of the worksheet that is calculated. 1.81.8

Excel JavaScript API 1.7 的最近更新What's new in Excel JavaScript API 1.7

Excel JavaScript API 要求集 1.7 的功能包括用于图表、事件、工作表、区域、文档属性、已命名项目、保护选项和样式的 API。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

通过新的图表 API,你可以创建其他图表类型、向图表中添加数据系列、设置图表标题、添加轴标题、添加显示单位、添加采用移动平均值的趋势线、将趋势线更改为线性趋势线等。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 事件 API 提供了多个事件处理程序,以便加载项能够在发生特定事件时自动运行指定的函数。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. 有关当前可用的事件列表,请参阅使用 Excel JavaScript API 处理事件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

使用新的 API 可以通过多种方式自定义工作表的外观: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. 使用 Excel 中的任意内置单元格样式,或者使用自己的自定义单元格样式。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

使用文档属性 API,你可以访问内置文档属性,并且还可以创建和管理自定义文档属性,以存储工作表的状态和驱动工作流和业务逻辑。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

使用工作表复制 APIs,你可以将一个工作表中的数据和格式复制到相同工作簿中的另一个工作表,从而减少所需的数据传输量。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

使用各种区域 API,你可以完成诸如获取周围区域、获取大小经过重设的区域之类的任务。Using the various range APIs, you can do things such as get the surrounding region, get a resized range, and more. 这些 API 可以显著提高诸如区域操作和寻址之类任务的效率。These APIs should make tasks like range manipulation and addressing much more efficient.

此外:In addition:

  • 工作簿和工作表保护选项 - 使用这些 API 可保护工作表和工作簿结构中的数据。Workbook and worksheet protection options - use these APIs to protect data in a worksheet and the workbook structure.
  • 更新已命名项目 - 使用此 API 可更新已命名项目。Update a named item - use this API to update a named item.
  • 获取活动单元格 - 使用此 API 可获取工作表中的活动单元格。Get active cell - use this API to get the active cell of a workbook.
对象Object 最近更新What is new 说明Description 要求集Requirement set
chartchart 属性 > chartTypeProperty > chartType 表示图表的类型。Represents the type of the chart. 可能的值包括:ColumnClustered、ColumnStacked、ColumnStacked100、BarClustered、BarStacked、BarStacked100、LineStacked、LineStacked100、LineMarkers、LineMarkersStacked、LineMarkersStacked100、PieOfPie 等。Possible values are: ColumnClustered, ColumnStacked, ColumnStacked100, BarClustered, BarStacked, BarStacked100, LineStacked, LineStacked100, LineMarkers, LineMarkersStacked, LineMarkersStacked100, PieOfPie, etc.. 1.71.7
chartchart 属性 > idProperty > id 图表的唯一 ID。The unique id of chart. 只读。Read-only. 1.71.7
chartchart 属性 > showAllFieldButtonsProperty > showAllFieldButtons 表示是否在数据透视图上显示所有字段按钮。Represents whether to display all field buttons on a PivotChart. 1.71.7
chartAreaFormatchartAreaFormat 关系 > borderRelationship > border 表示图表区域的边框格式,包括颜色、线条样式和粗细。Represents the border format of chart area, which includes color, linestyle and weight. 只读。Read-only. 1.71.7
chartAxeschartAxes 方法 > getItem(type: string, group: string)Method > getItem(type: string, group: string) 返回通过类型和组标识的特定轴。Returns the specific axis identified by type and group. 1.71.7
chartAxischartAxis 属性 > axisBetweenCategoriesProperty > axisBetweenCategories 表示数值轴是否与分类之间的分类轴交叉。Represents whether value axis crosses the category axis between categories. 1.71.7
chartAxischartAxis 属性 > axisGroupProperty > axisGroup 返回或设置指定轴的组。Represents the group for the specified axis. 只读。Read-only. 可能的值包括:Primary、Secondary。Possible values are: Primary, Secondary. 1.71.7
chartAxischartAxis 属性 > categoryTypeProperty > categoryType 返回或设置分类轴类型。Returns or sets the category axis type. 可能的值包括:Automatic、TextAxis、DateAxis。Possible values are: Automatic, TextAxis, DateAxis. 1.71.7
chartAxischartAxis 属性 > crossesProperty > crosses 表示两轴交叉处的特定轴。Represents the specified axis where the other axis crosses. 可能的值包括:Automatic、Maximum、Minimum、Custom。Possible values are: Automatic, Maximum, Minimum, Custom. 1.71.7
chartAxischartAxis 属性 > crossesAtProperty > crossesAt 表示两轴交叉处的特定轴。Represents the specified axis where the other axis crosses at. 只读。Read Only. 设置此属性应使用 SetCrossesAt(double) 方法。Set to this property should use SetCrossesAt(double) method. 只读。Read-only. 1.71.7
chartAxischartAxis 属性 > customDisplayUnitProperty > customDisplayUnit 标识自定义轴显示单位值。Represents the custom axis display unit value. 只读。Read Only. 要设置此属性,请使用 SetCustomDisplayUnit(double) 方法。To set this property, please use the SetCustomDisplayUnit(double) method. 只读。Read-only. 1.71.7
chartAxischartAxis 属性 > displayUnitProperty > displayUnit 表示轴显示单位。Represents the axis display unit. 可能的值包括:None、Hundreds、Thousands、TenThousands、HundredThousands、Millions、TenMillions、HundredMillions、Billions、Trillions、Custom。Possible values are: None, Hundreds, Thousands, TenThousands, HundredThousands, Millions, TenMillions, HundredMillions, Billions, Trillions, Custom. 1.71.7
chartAxischartAxis 属性 > heightProperty > height 表示图表轴的高度,以磅为单位。Represents the height, in points, of the chart axis. 如果轴不可见,则为 Null。Null if the axis's not visible. 只读。Read-only. 1.71.7
chartAxischartAxis 属性 > leftProperty > left 表示轴的左边缘到图表区域左侧的距离,以磅为单位。Represents the distance, in points, from the left edge of the axis to the left of chart area. 如果轴不可见,则为 Null。Null if the axis's not visible. 只读。Read-only. 1.71.7
chartAxischartAxis 属性 > logBaseProperty > logBase 表示使用对数刻度时对数的底数。Represents the base of the logarithm when using logarithmic scales. 1.71.7
chartAxischartAxis 属性 > reversePlotOrderProperty > reversePlotOrder 表示 Microsoft Excel 是否按照最后一个到第一个的顺序绘制数据点。Represents whether Microsoft Excel plots data points from last to first. 1.71.7
chartAxischartAxis 属性 > scaleTypeProperty > scaleType 表示数值轴刻度类型。Represents the value axis scale type. 可能的值包括:Linear、Logarithmic。Possible values are: Linear, Logarithmic. 1.71.7
chartAxischartAxis 属性 > showDisplayUnitLabelProperty > showDisplayUnitLabel 表示轴显示单位标签是否可见。Represents whether the axis display unit label is visible. 1.71.7
chartAxischartAxis 属性 > tickLabelSpacingProperty > tickLabelSpacing 表示刻度线标签之间的分类或系列数。Represents the number of categories or series between tick-mark labels. 可以是 1 到 31999 的值或空字符串(自动设置)。Can be a value from 1 through 31999 or an empty string for automatic setting. 返回的值始终为数字。The returned value is always a number. 1.71.7
chartAxischartAxis 属性 > tickMarkSpacingProperty > tickMarkSpacing 表示刻度线之间的分类或系列数。Represents the number of categories or series between tick marks. 1.71.7
chartAxischartAxis 属性 > topProperty > top 表示轴的上边缘到图表区域顶部的距离,以磅为单位。Represents the distance, in points, from the top edge of the axis to the top of chart area. 如果轴不可见,则为 Null。Null if the axis's not visible. 只读。Read-only. 1.71.7
chartAxischartAxis 属性 > typeProperty > type 表示轴类型。Represents the axis type. 只读。Read-only. 可能的值包括:Invalid、Category、Value、Series。Possible values are: Invalid, Category, Value, Series. 1.71.7
chartAxischartAxis 属性 > visibleProperty > visible 该布尔值表示轴的可见性。A boolean value represents the visibility of the axis. 1.71.7
chartAxischartAxis 属性 > widthProperty > width 表示图表轴的宽度,以磅为单位。Represents the width, in points, of the chart axis. 如果轴不可见,则为 Null。Null if the axis's not visible. 只读。Read-only. 1.71.7
chartAxischartAxis 关系 > baseTimeUnitRelationship > baseTimeUnit 返回或设置指定分类轴的基本单位。Returns or sets the base unit for the specified category axis. 1.71.7
chartAxischartAxis 关系 > majorTickMarkRelationship > majorTickMark 表示特定轴的主要刻度线类型。Represents the type of major tick mark for the specified axis. 1.71.7
chartAxischartAxis 关系 > majorTimeUnitScaleRelationship > majorTimeUnitScale 返回或设置当 CategoryType 属性设为 TimeScale 时分类轴的主要单位刻度值。Returns or sets the major unit scale value for the category axis when the CategoryType property is set to TimeScale. 1.71.7
chartAxischartAxis 关系 > minorTickMarkRelationship > minorTickMark 表示指定轴的次要刻度线类型。Represents the type of minor tick mark for the specified axis. 1.71.7
chartAxischartAxis 关系 > minorTimeUnitScaleRelationship > minorTimeUnitScale 返回或设置当 CategoryType 属性设为 TimeScale 时分类轴的次要单位刻度值。Returns or sets the minor unit scale value for the category axis when the CategoryType property is set to TimeScale. 1.71.7
chartAxischartAxis 关系 > tickLabelPositionRelationship > tickLabelPosition 表示特定轴上的刻度线标签位置。Represents the position of tick-mark labels on the specified axis. 1.71.7
chartAxischartAxis 方法 > setCategoryNames(sourceData: Range)Method > setCategoryNames(sourceData: Range) 设置指定轴的所有分类名称。Sets all the category names for the specified axis. 1.71.7
chartAxischartAxis 方法 > setCrossesAt(value: double)Method > setCrossesAt(value: double) 设置两轴交叉处的特定轴。Set the specified axis where the other axis crosses at. 1.71.7
chartAxischartAxis 方法 > setCustomDisplayUnit(value: double)Method > setCustomDisplayUnit(value: double) 将轴显示单位设为自定义值。Sets the axis display unit to a custom value. 1.71.7
chartBorderchartBorder 属性 > colorProperty > color 表示图表中的边框颜色的 HTML 颜色代码。HTML color code representing the color of borders in the chart. 1.71.7
chartBorderchartBorder 属性 > weightProperty > weight 表示边框的粗细,以磅为单位。Represents weight of the border, in points. 1.71.7
chartBorderchartBorder 关系 > lineStyleRelationship > lineStyle 表示边框的线条样式。Represents the line style of the border. 1.71.7
chartDataLabelchartDataLabel 属性 > positionProperty > position 表示数据标签的位置的 DataLabelPosition 值。可能的值是:None、Center、InsideEnd、InsideBase、OutsideEnd、Left、Right、Top、Bottom、BestFit、Callout。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.71.7
chartDataLabelchartDataLabel 属性 > separatorProperty > separator 该字符串表示用于图表中数据标签的分隔符。String representing the separator used for the data label on a chart. 1.71.7
chartDataLabelchartDataLabel 属性 > showBubbleSizeProperty > showBubbleSize 该布尔值表示数据标签气泡大小是否可见。Boolean value representing if the data label bubble size is visible or not. 1.71.7
chartDataLabelchartDataLabel 属性 > showCategoryNameProperty > showCategoryName 表示数据标签分类名称是否可见的布尔值。Boolean value representing if the data label category name is visible or not. 1.71.7
chartDataLabelchartDataLabel 属性 > showLegendKeyProperty > showLegendKey 该布尔值表示数据标签图例标示是否可见。Boolean value representing if the data label legend key is visible or not. 1.71.7
chartDataLabelchartDataLabel 属性 > showPercentageProperty > showPercentage 该布尔值表示数据标签百分比是否可见。Boolean value representing if the data label percentage is visible or not. 1.71.7
chartDataLabelchartDataLabel 属性 > showSeriesNameProperty > showSeriesName 该布尔值表示数据标签系列名称是否可见。Boolean value representing if the data label series name is visible or not. 1.71.7
chartDataLabelchartDataLabel 属性 > showValueProperty > showValue 该布尔值表示数据标签值是否可见。Boolean value representing if the data label value is visible or not. 1.71.7
chartLegendchartLegend 属性 > heightProperty > height 表示图表上的图例高度。Represents the height of the legend on the chart. 1.71.7
chartLegendchartLegend 属性 > leftProperty > left 表示图表图例左侧。Represents the left of a chart legend. 1.71.7
chartLegendchartLegend 属性 > showShadowProperty > showShadow 表示图表上的图例是否有阴影。Represents if the legend has shadow on the chart. 1.71.7
chartLegendchartLegend 属性 > topProperty > top 表示图表图例顶部。Represents the top of a chart legend. 1.71.7
chartLegendchartLegend 属性 > widthProperty > width 表示图表上的图例宽度。Represents the width of the legend on the chart. 1.71.7
chartLegendchartLegend 关系 > legendEntriesRelationship > legendEntries 表示图例中 legendEntries 的集合。Represents a collection of legendEntries in the legend. 只读。Read-only. 1.71.7
chartLegendEntrychartLegendEntry 属性 > visibleProperty > visible 表示图表图例条目可见。Represents the visible of a chart legend entry. 1.71.7
chartLegendEntryCollectionchartLegendEntryCollection 属性 > itemsProperty > items ChartLegendEntry 对象的集合。A collection of chartLegendEntry objects. 只读。Read-only. 1.71.7
chartLegendEntryCollectionchartLegendEntryCollection 方法 > getCount()Method > getCount() 返回集合中的 legendEntry 数量。Returns the number of legendEntry in the collection. 1.71.7
chartLegendEntryCollectionchartLegendEntryCollection 方法 > getItemAt(index: number)Method > getItemAt(index: number) 返回给定索引处的 legendEntry。Returns a legendEntry at the given index. 1.71.7
chartPointchartPoint 属性 > hasDataLabelProperty > hasDataLabel 表示数据点是否具有数据标签。Represents whether a data point has datalabel. 不适用于曲面图。Not applicable for surface charts. 1.71.7
chartPointchartPoint 属性 > markerBackgroundColorProperty > markerBackgroundColor 表示数据点的标记背景色的 HTML 颜色代码。HTML color code representation of the marker background color of data point. 例如,E.g. #FF0000 代表红色。#FF0000 represents Red. 1.71.7
chartPointchartPoint 属性 > markerForegroundColorProperty > markerForegroundColor 表示数据点的标记前景色的 HTML 颜色代码。HTML color code representation of the marker foreground color of data point. 例如,E.g. #FF0000 代表红色。#FF0000 represents Red. 1.71.7
chartPointchartPoint 属性 > markerSizeProperty > markerSize 表示数据点的标记大小。Represents marker size of data point. 1.71.7
chartPointchartPoint 属性 > markerStyleProperty > markerStyle 表示图表数据点的标记样式。Represents marker style of a chart data point. 可能的值包括:Invalid、Automatic、None、Square、Diamond、Triangle、X、Star、Dot、Dash、Circle、Plus、Picture。Possible values are: Invalid, Automatic, None, Square, Diamond, Triangle, X, Star, Dot, Dash, Circle, Plus, Picture. 1.71.7
chartPointchartPoint 关系 > dataLabelRelationship > dataLabel 返回图表点的数据标签。Returns the data label of a chart point. 只读。Read-only. 1.71.7
chartPointFormatchartPointFormat 关系 > borderRelationship > border 表示图表数据点的边框格式,包括颜色、样式和粗细信息。Represents the border format of a chart data point, which includes color, style and weight information. 只读。Read-only. 1.71.7
chartSerieschartSeries 属性 > chartTypeProperty > chartType 表示系列的图表类型。Represents the chart type of a series. 可能的值包括:ColumnClustered、ColumnStacked、ColumnStacked100、BarClustered、BarStacked、BarStacked100、LineStacked、LineStacked100、LineMarkers、LineMarkersStacked、LineMarkersStacked100、PieOfPie 等。Possible values are: ColumnClustered, ColumnStacked, ColumnStacked100, BarClustered, BarStacked, BarStacked100, LineStacked, LineStacked100, LineMarkers, LineMarkersStacked, LineMarkersStacked100, PieOfPie, etc.. 1.71.7
chartSerieschartSeries 属性 > doughnutHoleSizeProperty > doughnutHoleSize 表示图表系列的圆环孔大小。Represents the doughnut hole size of a chart series. 仅对圆环图和分离型圆环图有效。Only valid on doughnut and doughnutExploded charts. 1.71.7
chartSerieschartSeries 属性 > filteredProperty > filtered 该布尔值表示是否筛选系列。Boolean value representing if the series is filtered or not. 不适用于曲面图。Not applicable for surface charts. 1.71.7
chartSerieschartSeries 属性 > gapWidthProperty > gapWidth 表示图表系列的间隙宽度。Represents the gap width of a chart series. 有效对象:条形图和柱形图,以及Only valid on bar and column charts, as well as 1.71.7
chartSerieschartSeries 属性 > hasDataLabelsProperty > hasDataLabels 该布尔值表示系列是否具有数据标签。Boolean value representing if the series has data labels or not. 1.71.7
chartSerieschartSeries 属性 > markerBackgroundColorProperty > markerBackgroundColor 表示图表系列的标记背景色。Represents markers background color of a chart series. 1.71.7
chartSerieschartSeries 属性 > markerForegroundColorProperty > markerForegroundColor 表示图表系列的标记前景色。Represents markers foreground color of a chart series. 1.71.7
chartSerieschartSeries 属性 > markerSizeProperty > markerSize 表示图表系列的标记大小。Represents marker size of a chart series. 1.71.7
chartSerieschartSeries 属性 > markerStyleProperty > markerStyle 表示图表系列的标记类型。Represents marker style of a chart series. 可能的值包括:Invalid、Automatic、None、Square、Diamond、Triangle、X、Star、Dot、Dash、Circle、Plus、Picture。Possible values are: Invalid, Automatic, None, Square, Diamond, Triangle, X, Star, Dot, Dash, Circle, Plus, Picture. 1.71.7
chartSerieschartSeries 属性 > plotOrderProperty > plotOrder 表示图表组中某个图表系列的绘制顺序。Represents the plot order of a chart series within the chart group. 1.71.7
chartSerieschartSeries 属性 > showShadowProperty > showShadow 该布尔值表示系列是否具有阴影。Boolean value representing if the series has shadow or not. 1.71.7
chartSerieschartSeries 属性 > smoothProperty > smooth 该布尔值表示系列是否平滑。Boolean value representing if the series is smooth or not. 仅适用于折线图和散点图。Only for line and scatter charts. 1.71.7
chartSerieschartSeries 关系 > dataLabelsRelationship > dataLabels 表示系列中所有数据标签的集合。Represents a collection of all dataLabels in the series. 只读。Read-only. ApiSet.InProgressFeatures.ChartingAPIApiSet.InProgressFeatures.ChartingAPI
chartSerieschartSeries 关系 > trendlinesRelationship > trendlines 表示系列中趋势线的集合。Represents a collection of trendlines in the series. 只读。Read-only. 1.71.7
chartSerieschartSeries 方法 > delete()Method > delete() 删除 chart series 对象。Deletes the chart series. 1.71.7
chartSerieschartSeries 方法 > setBubbleSizes(sourceData: Range)Method > setBubbleSizes(sourceData: Range) 设置图表系列的气泡大小。Set bubble sizes for a chart series. 仅适用于气泡图。Only works for bubble charts. 1.71.7
chartSerieschartSeries 方法 > setValues(sourceData: Range)Method > setValues(sourceData: Range) 设置图表系列的值。Set values for a chart series. 对于散点图,它表示 Y 轴的值。For scatter chart, it means Y axis values. 1.71.7
chartSerieschartSeries 方法 > setXAxisValues(sourceData: Range)Method > setXAxisValues(sourceData: Range) 设置图表系列 X 轴的值。Set values of X axis for a chart series. 仅适用于散点图。Only works for scatter charts. 1.71.7
chartSeriesCollectionchartSeriesCollection 方法 > add(name: string, index: number)Method > add(name: string, index: number) 向集合添加新系列。Add a new series to the collection. 1.71.7
chartTitlechartTitle 属性 > heightProperty > height 返回图表标题的高度,以磅为单位。Returns the height, in points, of the chart title. 只读。Read-only. 如果图表标题不可见,则为 Null。Null if chart title's not visible. 只读。Read-only. 1.71.7
chartTitlechartTitle 属性 > horizontalAlignmentProperty > horizontalAlignment 表示图表标题水平对齐。Represents the horizontal alignment for chart title. 可能的值包括:Center、Left、Justify、Distributed、Right。Possible values are: Center, Left, Justify, Distributed, Right. 1.71.7
chartTitlechartTitle 属性 > leftProperty > left 表示图表标题左边缘到图表区域左边缘的距离,以磅为单位。Represents the distance, in points, from the left edge of chart title to the left edge of chart area. 如果图表标题不可见,则为 Null。Null if chart title's not visible. 1.71.7
chartTitlechartTitle 属性 > positionProperty > position 表示图表标题的位置。Represents the position of chart title. 可能的值包括:Top、Automatic、Bottom、Right、Left。Possible values are: Top, Automatic, Bottom, Right, Left. 1.71.7
chartTitlechartTitle 属性 > showShadowProperty > showShadow 表示一个布尔值,用于确定图表标题是否具有阴影。Represents a boolean value that determines if the chart title has a shadow. 1.71.7
chartTitlechartTitle 属性 > textOrientationProperty > textOrientation 表示图表标题的文本方向。Represents the text orientation of chart title. 此值应是 -90 到 90 或 180(垂直文本)之间的整数。The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. 1.71.7
chartTitlechartTitle 属性 > topProperty > top 表示图表标题上边缘到图表区域顶部的距离,以磅为单位。Represents the distance, in points, from the top edge of chart title to the top of chart area. 如果图表标题不可见,则为 Null。Null if chart title's not visible. 1.71.7
chartTitlechartTitle 属性 > verticalAlignmentProperty > verticalAlignment 表示图表标题垂直对齐。Represents the vertical alignment of chart title. 可能的值包括:Center、Bottom、Top、Justify、Distributed。Possible values are: Center, Bottom, Top, Justify, Distributed. 1.71.7
chartTitlechartTitle 属性 > widthProperty > width 返回图表标题的宽度,以磅为单位。Returns the width, in points, of the chart title. 只读。Read-only. 如果图表标题不可见,则为 Null。Null if chart title's not visible. 只读。Read-only. 1.71.7
chartTitlechartTitle 方法 > setFormula(formula: string)Method > setFormula(formula: string) 设置一个字符串值,用于表示采用 A1 表示法的图表标题的公式。Sets a string value that represents the formula of chart title using A1-style notation. 1.71.7
chartTitleFormatchartTitleFormat 关系 > borderRelationship > border 表示图表标题的边框格式,包括颜色、线条样式和粗细。Represents the border format of chart title, which includes color, linestyle and weight. 只读。Read-only. 1.71.7
chartTrendlinechartTrendline 属性 > backwardProperty > backward 表示趋势线向后延伸的周期数。Represents the number of periods that the trendline extends backward. 1.71.7
chartTrendlinechartTrendline 属性 > displayEquationProperty > displayEquation 如果图表上显示趋势线公式,则为 True。True if the equation for the trendline is displayed on the chart. 1.71.7
chartTrendlinechartTrendline 属性 > displayRSquaredProperty > displayRSquared 如果图表上显示趋势线的 R 平方值,则为 True。True if the R-squared for the trendline is displayed on the chart. 1.71.7
chartTrendlinechartTrendline 属性 > forwardProperty > forward 表示趋势线向前延伸的周期数。Represents the number of periods that the trendline extends forward. 1.71.7
chartTrendlinechartTrendline 属性 > interceptProperty > 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.71.7
chartTrendlinechartTrendline 属性 > movingAveragePeriodProperty > movingAveragePeriod 表示图表趋势线的周期,仅适用于 MovingAverage 类型的趋势线。Represents the period of a chart trendline, only for trendline with MovingAverage type. 1.71.7
chartTrendlinechartTrendline 属性 > nameProperty > name 表示趋势线的名称。Represents the name of the trendline. 可设为字符串值,或者设为 Null 值(表示自动值)。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.71.7
chartTrendlinechartTrendline 属性 > polynomialOrderProperty > polynomialOrder 表示图表趋势线的顺序,仅适用于 Polynomial 类型的趋势线。Represents the order of a chart trendline, only for trendline with Polynomial type. 1.71.7
chartTrendlinechartTrendline 属性 > typeProperty > type 表示图表趋势线的类型。Represents the type of a chart trendline. 可能的值包括:Linear、Exponential、Logarithmic、MovingAverage、Polynomial、Power。Possible values are: Linear, Exponential, Logarithmic, MovingAverage, Polynomial, Power. 1.71.7
chartTrendlinechartTrendline 关系 > formatRelationship > format 表示图表趋势线的格式。Represents the formatting of a chart trendline. 只读。Read-only. 1.71.7
chartTrendlinechartTrendline 方法 > delete()Method > delete() 删除 Trendline 对象。Delete the trendline object. 1.71.7
chartTrendlineCollectionchartTrendlineCollection 属性 > itemsProperty > items chartTrendline 对象的集合。A collection of chartTrendline objects. 只读。Read-only. 1.71.7
chartTrendlineCollectionchartTrendlineCollection 方法 > add(type: string)Method > add(type: string) 向趋势线集合添加新的趋势线。Adds a new trendline to trendline collection. 1.71.7
chartTrendlineCollectionchartTrendlineCollection 方法 > getCount()Method > getCount() 返回集合中的趋势线数量。Returns the number of trendlines in the collection. 1.71.7
chartTrendlineCollectionchartTrendlineCollection 方法 > getItem(index: number)Method > getItem(index: number) 按索引(在项目数组中的插入顺序)获取 Trendline 对象。Get trendline object by index, which is the insertion order in items array. 1.71.7
chartTrendlineFormatchartTrendlineFormat 关系 > lineRelationship > line 表示图表线条格式。只读。Represents chart line formatting. Read-only. 1.71.7
customPropertycustomProperty 属性 > keyProperty > key 获取 customProperty 的键。只读。只读。Gets the key of the custom property. Read only. Read-only. 1.71.7
customPropertycustomProperty 属性 > typeProperty > type 获取自定义属性的值类型。Gets the value type of the custom property. 只读。Read only. 只读。Read-only. 可能的值包括:Number、Boolean、Date、String、Float。Possible values are: Number, Boolean, Date, String, Float. 1.71.7
customPropertycustomProperty 属性 > valueProperty > value 获取或设置自定义属性的值。Gets or sets the value of the custom property. 1.71.7
customPropertycustomProperty 方法 > delete()Method > delete() 删除 custom property 对象。Deletes the custom property. 1.71.7
customPropertyCollectioncustomPropertyCollection 属性 > itemsProperty > items customProperty 对象的集合。只读。A collection of customProperty objects. Read-only. 1.71.7
customPropertyCollectioncustomPropertyCollection 方法 > add(key: string, value: object)Method > add(key: string, value: object) 新建自定义属性或设置现有自定义属性。Creates a new or sets an existing custom property. 1.71.7
customPropertyCollectioncustomPropertyCollection 方法 > deleteAll()Method > deleteAll() 删除此集合中的所有自定义属性。Deletes all custom properties in this collection. 1.71.7
customPropertyCollectioncustomPropertyCollection 方法 > getCount()Method > getCount() 获取自定义属性的计数。Gets the count of custom properties. 1.71.7
customPropertyCollectioncustomPropertyCollection 方法 > getItem(key: string)Method > getItem(key: string) 按键获取 custom property 对象(不区分大小写)。当不存在自定义属性时引发。Gets a custom property object by its key, which is case-insensitive. Throws if the custom property does not exist. 1.71.7
customPropertyCollectioncustomPropertyCollection 方法 > getItemOrNullObject(key: string)Method > getItemOrNullObject(key: string) 按键获取 custom property 对象(不区分大小写)。如果不存在自定义属性,则返回 null 对象。Gets a custom property object by its key, which is case-insensitive. Returns a null object if the custom property does not exist. 1.71.7
dataConnectionCollectiondataConnectionCollection 属性 > itemsProperty > items dataConnection 对象的集合。A collection of dataConnection objects. 只读。Read-only. 1.71.7
dataConnectionCollectiondataConnectionCollection 方法 > refreshAll()Method > refreshAll() 刷新集合中的所有数据连接。Refreshes all the Data Connections in the collection. 1.71.7
documentPropertiesdocumentProperties 属性 > authorProperty > author 获取或设置工作簿的作者。Gets or sets the author of the workbook. 1.71.7
documentPropertiesdocumentProperties 属性 > categoryProperty > category 获取或设置工作簿的类别。Gets or sets the category of the workbook. 1.71.7
documentPropertiesdocumentProperties 属性 > commentsProperty > comments 获取或设置工作簿的注释。Gets or sets the comments of the workbook. 1.71.7
documentPropertiesdocumentProperties 属性 > companyProperty > company 获取或设置工作簿的公司。Gets or sets the company of the workbook. 1.71.7
documentPropertiesdocumentProperties 属性 > keywordsProperty > keywords 获取或设置工作簿的关键字。Gets or sets the keywords of the workbook. 1.71.7
documentPropertiesdocumentProperties 属性 > lastAuthorProperty > lastAuthor 获取工作簿的最终作者。Gets the last author of the workbook. 只读。Read only. 只读。Read-only. 1.71.7
documentPropertiesdocumentProperties 属性 > managerProperty > manager 获取或设置工作簿的管理者。Gets or sets the manager of the workbook. 1.71.7
documentPropertiesdocumentProperties 属性 > revisionNumberProperty > revisionNumber 获取工作簿的修订号。Gets the revision number of the workbook. 只读。Read only. 1.71.7
documentPropertiesdocumentProperties 属性 > subjectProperty > subject 获取或设置工作簿的主题。Gets or sets the subject of the workbook. 1.71.7
documentPropertiesdocumentProperties 属性 > titleProperty > title 获取或设置工作簿的标题。Gets or sets the title of the workbook. 1.71.7
documentPropertiesdocumentProperties 关系 > creationDateRelationship > creationDate 获取工作簿的创建日期。Gets the creation date of the workbook. 只读。Read only. 只读。Read-only. 1.71.7
documentPropertiesdocumentProperties 关系 > customRelationship > custom 获取工作簿的自定义属性的集合。Gets the collection of custom properties of the workbook. 只读。Read only. 只读。Read-only. 1.71.7
namedItemnamedItem 属性 > formulaProperty > formula 获取或设置的已命名项目的公式。Gets or sets the formula of the named item. 公式始终以等号 (=) 开头。Formula always starts with a '=' sign. 1.71.7
namedItemnamedItem 关系 > arrayValuesRelationship > arrayValues 返回包含已命名项目的值和类型的对象。Returns an object containing values and types of the named item. 只读。Read-only. 1.71.7
namedItemArrayValuesnamedItemArrayValues 属性 > typesProperty > types 表示已命名项目数组中每个项目的类型。只读。Represents the types for each item in the named item array Read-only. 可能的值包括:Unknown、Empty、String、Integer、Double、Boolean、Error。Possible values are: Unknown, Empty, String, Integer, Double, Boolean, Error. 1.71.7
namedItemArrayValuesnamedItemArrayValues 属性 > valuesProperty > values 表示已命名项目数组中每个项目的值。Represents the values of each item in the named item array. 只读。Read-only. 1.71.7
rangerange 属性 > isEntireColumnProperty > isEntireColumn 表示当前区域是否为整列。Represents if the current range is an entire column. 只读。Read-only. 1.71.7
rangerange 属性 > isEntireRowProperty > isEntireRow 表示当前区域是否为整行。Represents if the current range is an entire row. 只读。Read-only. 1.71.7
rangerange 属性 > numberFormatLocalProperty > numberFormatLocal 表示 Excel 中的给定区域的数字格式代码,以用户语言的字符串表示。Represents Excel's number format code for the given range as a string in the language of the user. 1.71.7
rangerange 属性 > styleProperty > style 表示当前区域的样式。Represents the style of the current range. 它将返回 null 或字符串。This return either null or a string. 1.71.7
rangerange 方法 > getAbsoluteResizedRange(numRows: number, numColumns: number)Method > getAbsoluteResizedRange(numRows: number, numColumns: number) 获取一个 Range 对象,该对象的左上单元格与当前 Range 对象相同,但具有指定的行数和列数。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.71.7
rangerange 方法 > getImage()Method > getImage() 将区域呈现为 base64 编码图像。Renders the range as a base64-encoded image. 1.71.7
rangerange 方法 > getSurroundingRegion()Method > getSurroundingRegion() 返回一个 Range 对象,该对象表示此区域左上单元格的周围区域。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.71.7
rangerange 方法 > showCard()Method > showCard() 显示活动单元格的卡片(如果该单元格具有富值内容)。Displays the card for an active cell if it has rich value content. 1.71.7
rangeFormatrangeFormat 属性 > textOrientationProperty > textOrientation 获取或设置区域内的所有单元格的文本方向。Gets or sets the text orientation of all the cells within the range. 1.71.7
rangeFormatrangeFormat 属性 > useStandardHeightProperty > useStandardHeight 确定 Range 对象的行高是否等于工作表的标准行高。Determines if the row height of the Range object equals the standard height of the sheet. 1.71.7
rangeFormatrangeFormat 属性 > useStandardWidthProperty > useStandardWidth 确定 Range 对象的列宽是否等于工作表的标准列宽。Determines if the columnwidth of the Range object equals the standard width of the sheet. 1.71.7
rangeHyperlinkrangeHyperlink 属性 > addressProperty > address 表示超链接的 URL 目标。Represents the url target for the hyperlink. 1.71.7
rangeHyperlinkrangeHyperlink 属性 > document..Property > document.. 表示超链接的Represents the document .. 文档目标。target for the hyperlink. 1.71.7
rangeHyperlinkrangeHyperlink 属性 > screenTipProperty > screenTip 表示鼠标悬停在超链接上时显示的字符串。Represents the string displayed when hovering over the hyperlink. 1.71.7
rangeHyperlinkrangeHyperlink 属性 > textToDisplayProperty > textToDisplay 表示区域最左上方单元格中显示的字符串。Represents the string that is displayed in the top left most cell in the range. 1.71.7
stylestyle 属性 > addIndentProperty > addIndent 指示将单元格中的文本对齐方式设为相等分布时文本是否会自动缩进。Indicates if text is automatically indented when the text alignment in a cell is set to equal distribution. 1.71.7
stylestyle 属性 > autoIndentProperty > autoIndent 指示将单元格中的文本对齐方式设为相等分布时文本是否会自动缩进。Indicates if text is automatically indented when the text alignment in a cell is set to equal distribution. 1.71.7
stylestyle 属性 > builtInProperty > builtIn 指示样式是否为内置样式。Indicates if the style is a built-in style. 只读。Read-only. 1.71.7
stylestyle 属性 > formulaHiddenProperty > formulaHidden 指示工作表受保护时是否隐藏公式。Indicates if the formula will be hidden when the worksheet is protected. 1.71.7
stylestyle 属性 > horizontalAlignmentProperty > horizontalAlignment 表示样式水平对齐。Represents the horizontal alignment for the style. 可能的值包括:General、Left、Center、Right、Fill、Justify、CenterAcrossSelection、Distributed。Possible values are: General, Left, Center, Right, Fill, Justify, CenterAcrossSelection, Distributed. 1.71.7
stylestyle 属性 > includeAlignmentProperty > includeAlignment 指示样式是否包含 AutoIndent、HorizontalAlignment、VerticalAlignment、WrapText、IndentLevel 和 TextOrientation 属性。Indicates if the style includes the AutoIndent, HorizontalAlignment, VerticalAlignment, WrapText, IndentLevel, and TextOrientation properties. 1.71.7
stylestyle 属性 > includeBorderProperty > includeBorder 指示样式是否包含 Color、ColorIndex、LineStyle 和 Weight 边框属性。Indicates if the style includes the Color, ColorIndex, LineStyle, and Weight border properties. 1.71.7
stylestyle 属性 > includeFontProperty > includeFont 指示样式是否包含 Background、Bold、Color、ColorIndex、FontStyle、Italic、Name、Size、Strikethrough、Subscrip、Superscript 和 Underline 字体属性。Indicates if the style includes the Background, Bold, Color, ColorIndex, FontStyle, Italic, Name, Size, Strikethrough, Subscript, Superscript, and Underline font properties. 1.71.7
stylestyle 属性 > includeNumberProperty > includeNumber 指示样式是否包含 NumberFormat 属性。Indicates if the style includes the NumberFormat property. 1.71.7
stylestyle 属性 > includePatternsProperty > includePatterns 指示样式是否包含 Color、ColorIndex、InvertIfNegative、Pattern、PatternColor 和 PatternColorIndex 内部属性。Indicates if the style includes the Color, ColorIndex, InvertIfNegative, Pattern, PatternColor, and PatternColorIndex interior properties. 1.71.7
stylestyle 属性 > includeProtectionProperty > includeProtection 指示样式是否包含 FormulaHidden 和 Locked 保护属性。Indicates if the style includes the FormulaHidden and Locked protection properties. 1.71.7
stylestyle 属性 > indentLevelProperty > indentLevel 0 到 250 之间的一个整数,指示样式的缩进水平。An integer from 0 to 250 that indicates the indent level for the style. 1.71.7
stylestyle 属性 > lockedProperty > locked 指示工作表受保护时是否锁定对象。Indicates if the object is locked when the worksheet is protected. 1.71.7
stylestyle 属性 > nameProperty > name 样式的名称。The name of the style. 只读。Read-only. 1.71.7
stylestyle 属性 > numberFormatProperty > numberFormat 样式中数字格式的格式代码。The format code of the number format for the style. 1.71.7
stylestyle 属性 > numberFormatLocalProperty > numberFormatLocal 样式中数字格式的本地化格式代码。The localized format code of the number format for the style. 1.71.7
stylestyle 属性 > orientationProperty > orientation 此样式中的文本方向。The text orientation for the style. 1.71.7
stylestyle 属性 > readingOrderProperty > readingOrder 样式中的阅读顺序。The reading order for the style. 可能的值包括:Context、LeftToRight、RightToLeft。Possible values are: Context, LeftToRight, RightToLeft. 1.71.7
stylestyle 属性 > shrinkToFitProperty > shrinkToFit 指示文本是否自动缩小以适合可用列宽。Indicates if text automatically shrinks to fit in the available column width. 1.71.7
stylestyle 属性 > textOrientationProperty > textOrientation 此样式中的文本方向。The text orientation for the style. 1.71.7
stylestyle 属性 > verticalAlignmentProperty > verticalAlignment 表示样式的垂直对齐方式。Represents the vertical alignment for the style. 可能的值包括:Top、Center、Bottom、Justify、Distributed。Possible values are: Top, Center, Bottom, Justify, Distributed. 1.71.7
stylestyle 属性 > wrapTextProperty > wrapText 指示 Microsoft Excel 是否将对象中的文本换行。Indicates if Microsoft Excel wraps the text in the object. 1.71.7
stylestyle 关系 > bordersRelationship > borders 四个 Border 对象的 Border 集合,表示四个边框的样式。A Border collection of four Border objects that represent the style of the four borders. 只读。Read-only. 1.71.7
stylestyle 关系 > fillRelationship > fill 样式的填充。The Fill of the style. 只读。Read-only. 1.71.7
stylestyle 关系 > fontRelationship > font 该 Font 对象表示样式的字体。A Font object that represents the font of the style. 只读。Read-only. 1.71.7
stylestyle 方法 > delete()Method > delete() 删除此样式。Deletes this style. 1.71.7
styleCollectionstyleCollection 属性 > itemsProperty > items style 对象的集合。A collection of style objects. 只读。Read-only. 1.71.7
styleCollectionstyleCollection 方法 > add(name: string)]Method > add(name: string)] 向集合添加新样式。Adds a new style to the collection. 1.71.7
styleCollectionstyleCollection 方法 > getItem(name: string)Method > getItem(name: string) 按名称获取样式。Gets a style by name. 1.71.7
tableChangedEventArgstableChangedEventArgs 属性 > addressProperty > address 获取地址,该地址表示特定工作表上的表格的更改区域。Gets the address that represents the changed area of a table on a specific worksheet. 1.71.7
tableChangedEventArgstableChangedEventArgs 属性 > changeTypeProperty > changeType 获取更改类型,该类型表示 Changed 事件的触发方式。Gets the change type that represents how the Changed event is triggered. 可能的值包括:Others、RangeEdited、RowInserted、RowDeleted、ColumnInserted、ColumnDeleted、CellInserted、CellDeleted。Possible values are: Others, RangeEdited, RowInserted, RowDeleted, ColumnInserted, ColumnDeleted, CellInserted, CellDeleted. 1.71.7
tableChangedEventArgstableChangedEventArgs 属性 > sourceProperty > source 获取事件源。Gets the source of the event. 可能的值包括:Local、Remote。Possible values are: Local, Remote. 1.71.7
tableChangedEventArgstableChangedEventArgs 属性 > tableIdProperty > tableId 获取其中的数据发生更改的表格的 ID。Gets the id of the table in which the data changed. 1.71.7
tableChangedEventArgstableChangedEventArgs 属性 > typeProperty > type 获取事件的类型。Gets the type of the event. 可能的值包括:WorksheetDataChanged、WorksheetSelectionChanged、WorksheetAdded、WorksheetActivated、WorksheetDeactivated、TableDataChanged、TableSelectionChanged、WorksheetDeleted。Possible values are: WorksheetDataChanged, WorksheetSelectionChanged, WorksheetAdded, WorksheetActivated, WorksheetDeactivated, TableDataChanged, TableSelectionChanged, WorksheetDeleted. 1.71.7
tableChangedEventArgstableChangedEventArgs 属性 > worksheetIdProperty > worksheetId 获取其中的数据发生更改的工作表的 ID。Gets the id of the worksheet in which the data changed. 1.71.7
tableSelectionChangedEventArgstableSelectionChangedEventArgs 属性 > addressProperty > address 获取区域地址,该地址表示特定工作表上的表格选定区域。Gets the range address that represents the selected area of the table on a specific worksheet. 1.71.7
tableSelectionChangedEventArgstableSelectionChangedEventArgs 属性 > isInsideTableProperty > isInsideTable 指示选定区域是否在表格内,如果 IsInsideTable 为 false,则地址无效。Indicates if the selection is inside a table, address will be useless if IsInsideTable is false. 1.71.7
tableSelectionChangedEventArgstableSelectionChangedEventArgs 属性 > tableIdProperty > tableId 获取其中的选定区域发生更改的表格 ID。Gets the id of the table in which the selection changed. 1.71.7
tableSelectionChangedEventArgstableSelectionChangedEventArgs 属性 > typeProperty > type 获取事件的类型。Gets the type of the event. 可能的值包括:WorksheetDataChanged、WorksheetSelectionChanged、WorksheetAdded、WorksheetActivated、WorksheetDeactivated、TableDataChanged、TableSelectionChanged、WorksheetDeleted。Possible values are: WorksheetDataChanged, WorksheetSelectionChanged, WorksheetAdded, WorksheetActivated, WorksheetDeactivated, TableDataChanged, TableSelectionChanged, WorksheetDeleted. 1.71.7
tableSelectionChangedEventArgstableSelectionChangedEventArgs 属性 > worksheetIdProperty > worksheetId 获取其中的选定区域发生更改的工作表的 ID。Gets the id of the worksheet in which the selection changed. 1.71.7
workbookworkbook 属性 > nameProperty > name 获取工作簿名称。Gets the workbook name. 只读。Read-only. 1.71.7
workbookworkbook 关系 > dataConnectionsRelationship > dataConnections 刷新工作簿中的所有数据连接。Refreshes all data connections in the workbook. 只读。Read-only. 1.71.7
workbookworkbook 关系 > propertiesRelationship > properties 获取工作簿属性。Gets the workbook properties. 只读。Read-only. 1.71.7
workbookworkbook 关系 > protectionRelationship > protection 返回工作簿的工作簿保护对象。Returns workbook protection object for a workbook. 只读。Read-only. 1.71.7
workbookworkbook 关系 > stylesRelationship > styles 表示与工作簿关联的样式的集合。Represents a collection of styles associated with the workbook. 只读。Read-only. 1.71.7
workbookworkbook 方法 > getActiveCell()Method > getActiveCell() 获取工作簿中当前处于活动状态的单元格。Gets the currently active cell from the workbook. 1.71.7
workbookProtectionworkbookProtection 属性 > protectedProperty > protected 指示工作簿是否受保护。Indicates if the workbook is protected. 只读。Read-Only. 只读。Read-only. 1.71.7
workbookProtectionworkbookProtection 方法 > protect(password: string)Method > protect(password: string) 保护工作簿。Protects a workbook. 如果工作簿处于受保护状态,则无法执行此方法。Fails if the workbook has been protected. 1.71.7
workbookProtectionworkbookProtection 方法 > unprotect(password: string)Method > unprotect(password: string) 解除保护工作簿。Unprotects a workbook. 1.71.7
worksheetworksheet 属性 > gridlinesProperty > gridlines 获取或设置工作表的网格线标志。Gets or sets the worksheet's gridlines flag. 1.71.7
worksheetworksheet 属性 > headingsProperty > headings 获取或设置工作表的标题标志。Gets or sets the worksheet's headings flag. 1.71.7
worksheetworksheet 属性 > showHeadingsProperty > showHeadings 获取或设置工作表的标题标志。Gets or sets the worksheet's headings flag. 1.71.7
worksheetworksheet 属性 > standardHeightProperty > standardHeight 返回工作表中所有行的标准(默认)行高,以磅为单位。Returns the standard (default) height of all the rows in the worksheet, in points. 只读。Read-only. 1.71.7
worksheetworksheet 属性 > standardWidthProperty > standardWidth 返回或设置工作表中所有列的标准(默认)列宽。Returns or sets the standard (default) width of all the columns in the worksheet. 1.71.7
worksheetworksheet 属性 > tabColorProperty > tabColor 获取或设置工作表标签颜色。Gets or sets the worksheet tab color. 1.71.7
worksheetworksheet 关系 > freezePanesRelationship > freezePanes 获取可用于控制工作表上的冻结窗格的对象。只读。Gets an object that can be used to manipulate frozen panes on the worksheet Read-only. 1.71.7
worksheetworksheet 方法 > copy(positionType: WorksheetPositionType, relativeTo: Worksheet)Method > copy(positionType: WorksheetPositionType, relativeTo: Worksheet) 复制工作表并将其置于指定位置。Copy a worksheet and place it at the specified position. 返回复制的工作表。Return the copied worksheet. 1.71.7
worksheetworksheet 方法 > getRangeByIndexes(startRow: number, startColumn: number, rowCount: number, columnCount: number)Method > getRangeByIndexes(startRow: number, startColumn: number, rowCount: number, columnCount: number) 获取以特定行索引和列索引开始并跨越了一定数量的行和列的 range 对象。Gets the range object beginning at a particular row index and column index, and spanning a certain number of rows and columns. 1.71.7
worksheetActivatedEventArgsworksheetActivatedEventArgs 属性 > typeProperty > type 获取事件的类型。Gets the type of the event. 可能的值包括:WorksheetDataChanged、WorksheetSelectionChanged、WorksheetAdded、WorksheetActivated、WorksheetDeactivated、TableDataChanged、TableSelectionChanged、WorksheetDeleted。Possible values are: WorksheetDataChanged, WorksheetSelectionChanged, WorksheetAdded, WorksheetActivated, WorksheetDeactivated, TableDataChanged, TableSelectionChanged, WorksheetDeleted. 1.71.7
worksheetActivatedEventArgsworksheetActivatedEventArgs 属性 > worksheetIdProperty > worksheetId 获取已启用的工作表的 ID。Gets the id of the worksheet that is activated. 1.71.7
worksheetAddedEventArgsworksheetAddedEventArgs 属性 > sourceProperty > source 获取事件源。Gets the source of the event. 可能的值包括:Local、Remote。Possible values are: Local, Remote. 1.71.7
worksheetAddedEventArgsworksheetAddedEventArgs 属性 > typeProperty > type 获取事件的类型。Gets the type of the event. 可能的值包括:WorksheetDataChanged、WorksheetSelectionChanged、WorksheetAdded、WorksheetActivated、WorksheetDeactivated、TableDataChanged、TableSelectionChanged、WorksheetDeleted。Possible values are: WorksheetDataChanged, WorksheetSelectionChanged, WorksheetAdded, WorksheetActivated, WorksheetDeactivated, TableDataChanged, TableSelectionChanged, WorksheetDeleted. 1.71.7
worksheetAddedEventArgsworksheetAddedEventArgs 属性 > worksheetIdProperty > worksheetId 获取已添加至工作簿的工作表的 ID。Gets the id of the worksheet that is added to the workbook. 1.71.7
worksheetChangedEventArgsworksheetChangedEventArgs 属性 > addressProperty > address 获取区域地址,该地址表示特定工作表上的更改区域。Gets the range address that represents the changed area of a specific worksheet. 1.71.7
worksheetChangedEventArgsworksheetChangedEventArgs 属性 > changeTypeProperty > changeType 获取更改类型,该类型表示 Changed 事件的触发方式。Gets the change type that represents how the Changed event is triggered. 可能的值包括:Others、RangeEdited、RowInserted、RowDeleted、ColumnInserted、ColumnDeleted、CellInserted、CellDeleted。Possible values are: Others, RangeEdited, RowInserted, RowDeleted, ColumnInserted, ColumnDeleted, CellInserted, CellDeleted. 1.71.7
worksheetChangedEventArgsworksheetChangedEventArgs 属性 > sourceProperty > source 获取事件源。Gets the source of the event. 可能的值包括:Local、Remote。Possible values are: Local, Remote. 1.71.7
worksheetChangedEventArgsworksheetChangedEventArgs 属性 > typeProperty > type 获取事件的类型。Gets the type of the event. 可能的值包括:WorksheetDataChanged、WorksheetSelectionChanged、WorksheetAdded、WorksheetActivated、WorksheetDeactivated、TableDataChanged、TableSelectionChanged、WorksheetDeleted。Possible values are: WorksheetDataChanged, WorksheetSelectionChanged, WorksheetAdded, WorksheetActivated, WorksheetDeactivated, TableDataChanged, TableSelectionChanged, WorksheetDeleted. 1.71.7
worksheetChangedEventArgsworksheetChangedEventArgs 属性 > worksheetIdProperty > worksheetId 获取其中的数据发生更改的工作表的 ID。Gets the id of the worksheet in which the data changed. 1.71.7
worksheetDeactivatedEventArgsworksheetDeactivatedEventArgs 属性 > typeProperty > type 获取事件的类型。Gets the type of the event. 可能的值包括:WorksheetDataChanged、WorksheetSelectionChanged、WorksheetAdded、WorksheetActivated、WorksheetDeactivated、TableDataChanged、TableSelectionChanged、WorksheetDeleted。Possible values are: WorksheetDataChanged, WorksheetSelectionChanged, WorksheetAdded, WorksheetActivated, WorksheetDeactivated, TableDataChanged, TableSelectionChanged, WorksheetDeleted. 1.71.7
worksheetDeactivatedEventArgsworksheetDeactivatedEventArgs 属性 > worksheetIdProperty > worksheetId 获取已停用的工作表的 ID。Gets the id of the worksheet that is deactivated. 1.71.7
worksheetDeletedEventArgsworksheetDeletedEventArgs 属性 > sourceProperty > source 获取事件源。Gets the source of the event. 可能的值包括:Local、Remote。Possible values are: Local, Remote. 1.71.7
worksheetDeletedEventArgsworksheetDeletedEventArgs 属性 > typeProperty > type 获取事件的类型。Gets the type of the event. 可能的值包括:WorksheetDataChanged、WorksheetSelectionChanged、WorksheetAdded、WorksheetActivated、WorksheetDeactivated、TableDataChanged、TableSelectionChanged、WorksheetDeleted。Possible values are: WorksheetDataChanged, WorksheetSelectionChanged, WorksheetAdded, WorksheetActivated, WorksheetDeactivated, TableDataChanged, TableSelectionChanged, WorksheetDeleted. 1.71.7
worksheetDeletedEventArgsworksheetDeletedEventArgs 属性 > worksheetIdProperty > worksheetId 获取已从工作簿删除的工作表的 ID。Gets the id of the worksheet that is deleted from the workbook. 1.71.7
worksheetFreezePanesworksheetFreezePanes 方法 > freezeAt(frozenRange: Range or string)Method > freezeAt(frozenRange: Range or string) 设置活动工作表视图中的冻结单元格。Sets the frozen cells in the active worksheet view. 1.71.7
worksheetFreezePanesworksheetFreezePanes 方法 > freezeColumns(count: number)Method > freezeColumns(count: number) 就地冻结工作表的第一列。Freeze the first column(s) of the worksheet in place. 1.71.7
worksheetFreezePanesworksheetFreezePanes 方法 > freezeRows(count: number)Method > freezeRows(count: number) 就地冻结工作表的顶行。Freeze the top row(s) of the worksheet in place. 1.71.7
worksheetFreezePanesworksheetFreezePanes 方法 > getLocation()Method > getLocation() 获取用于描述活动工作表视图中的冻结单元格的区域。Gets a range that describes the frozen cells in the active worksheet view. 1.71.7
worksheetFreezePanesworksheetFreezePanes 方法 > getLocationOrNullObject()Method > getLocationOrNullObject() 获取用于描述活动工作表视图中的冻结单元格的区域。Gets a range that describes the frozen cells in the active worksheet view. 1.71.7
worksheetFreezePanesworksheetFreezePanes 方法 > unfreeze()Method > unfreeze() 移除工作表中的所有冻结窗格。Removes all frozen panes in the worksheet. 1.71.7
worksheetProtectionOptionsworksheetProtectionOptions 属性 > allowEditObjectsProperty > allowEditObjects 表示允许编辑对象的工作表保护选项。Represents the worksheet protection option of allowing editing objects. 1.71.7
worksheetProtectionOptionsworksheetProtectionOptions 属性 > allowEditScenariosProperty > allowEditScenarios 表示允许编辑应用场景的工作表保护选项。Represents the worksheet protection option of allowing editing scenarios. 1.71.7
worksheetProtectionOptionsworksheetProtectionOptions 关系 > selectionModeRelationship > selectionMode 表示选择模式的工作表保护选项。Represents the worksheet protection option of selection mode. 1.71.7
worksheetSelectionChangedEventArgsworksheetSelectionChangedEventArgs 属性 > addressProperty > address 获取区域地址,该地址表示特定工作表上的选定区域。Gets the range address that represents the selected area of a specific worksheet. 1.71.7
worksheetSelectionChangedEventArgsworksheetSelectionChangedEventArgs 属性 > typeProperty > type 获取事件的类型。Gets the type of the event. 可能的值包括:WorksheetDataChanged、WorksheetSelectionChanged、WorksheetAdded、WorksheetActivated、WorksheetDeactivated、TableDataChanged、TableSelectionChanged、WorksheetDeleted。Possible values are: WorksheetDataChanged, WorksheetSelectionChanged, WorksheetAdded, WorksheetActivated, WorksheetDeactivated, TableDataChanged, TableSelectionChanged, WorksheetDeleted. 1.71.7
worksheetSelectionChangedEventArgsworksheetSelectionChangedEventArgs 属性 > worksheetIdProperty > worksheetId 获取其中的选定区域发生更改的工作表的 ID。Gets the id of the worksheet in which the selection changed. 1.71.7

Excel JavaScript API 1.6 的最近更新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.
  • 提供优先级和 stopifTrue 功能。Provides priority and stopifTrue capability.
  • 获取给定区域内所有条件格式的集合。Get collection of all conditional formatting on a given range.
  • 清除当前指定区