Excel JavaScript API 概述Excel JavaScript API overview

可以使用 Excel JavaScript API 构建适用于 Excel 2016 或更高版本的加载项。You can use the Excel JavaScript API to build add-ins for Excel 2016 or later. 以下列表显示在 API 中可用的高级 Excel 对象。The following list shows the high-level Excel objects that are available in the API. 每个对象页面链接包含对象可用的属性、事件和方法的描述。Each object page link contains a description of the properties, events, and methods that are available on the object. 如需了解详细信息,请从菜单中浏览相应链接。Explore the links from the menu to learn more.

为了方便起见,下面列出了一些核心 Excel 对象:Some of the core Excel objects are listed below for convenience:

  • 工作簿:包含相关 workbook 对象的顶级对象,例如 worksheet、table、range 等。它还可以用于列出相关的参考。Workbook: The top-level object that contains related workbook objects such as worksheets, tables, ranges, etc. It also can be used to list related references.

  • Worksheet:表示工作簿中的工作表。Worksheet: Represents a worksheet in a workbook.

  • Range:表示某一单元格、某一行、某一列、某一单元格选定区域(其中包含一个或多个相邻单元格块)。Range: Represents a cell, a row, a column, or a selection of cells containing one or more contiguous blocks of cells.

    • ConditionalFormat:定义满足规则条件时应用到该区域的规则和格式的对象。ConditionalFormat: An object defining a rule and a format applied to the range when the rule's condition is met.
    • DataValidation:根据各种条件将用户输入限制在某个区域内的对象。DataValidation: An object that restricts user input to a range based on a variety of criteria.
    • RangeSort:表示管理区域中排序操作的对象。RangeSort: Represents a object that manages sorting operations on a range.
  • Table:表示有组织的单元格的集合,设计用于简化数据管理。Table: Represents a collection of organized cells designed to make management of the data easy.

  • Chart:表示工作表中的 chart 对象,它是基础数据的可视表示形式。Chart: Represents a chart object in a worksheet, which is a visual representation of underlying data.

  • PivotTable:表示 Excel 数据透视表,它是数据的分层分组表示。PivotTable: Represents an Excel PivotTable, which is a hierarchical grouping and presentation of data.

  • Filter:表示管理表格列筛选的对象。Filter: Represents an object that manages the filtering of a table's column.

  • NamedItem:表示单元格区域或值的定义名称。NamedItem: Represents a defined name for a range of cells or a value.

  • Binding:表示对工作簿的某一部分的绑定的抽象类。Binding: An abstract class that represents a binding to a section of the workbook.

Excel JavaScript API 开放性规范Excel JavaScript API open specifications

在我们设计和开发用于 Excel 加载项的新 API 时,我们将使它们可在开放 API 规范页面上接收反馈。As we design and develop new APIs for Excel add-ins, we'll make them available for your feedback on our Open API specifications page. 了解即将推出的面向 Excel JavaScript API 的新功能,并提供对我们的设计规范的宝贵意见。Find out what new features are in the pipeline for the Excel JavaScript APIs, and provide your input on our design specifications.

Excel JavaScript API 要求集Excel JavaScript API requirement sets

要求集是指各组已命名的 API 成员。Requirement sets are named groups of API members. Office 加载项使用清单中指定的要求集或执行运行时检查,以确定 Office 主机是否支持加载项所需的 API。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. 有关 Excel JavaScript API 要求集的详细信息,请参阅 Excel JavaScript API 要求集文章。For detailed information about Excel JavaScript API requirement sets, see the Excel JavaScript API requirement sets article.

Excel JavaScript API 参考Excel JavaScript API reference

有关 Excel JavaScript API 的详细信息,请参阅 Excel JavaScript API 参考文档For detailed information about the Excel JavaScript API, see the Excel JavaScript API reference documentation.

另请参阅See also