Excel JavaScript API 1.16 中的新增功能

ExcelApi 1.16 添加了 数据类型 API。 使用数据类型 API,Excel 单元格可以包含 来自 Web 的图像、在整个计算过程中保留其格式的 格式化数字值 ,尤其是实体卡。 实体卡将 Excel 加载项的潜力扩展到 2 维网格之外。 它们在单元格中显示一个图标,该图标在选中后会在 Excel UI 中打开卡片模式窗口。 要了解详细信息,请参阅 使用具有实体值数据类型的卡片

下表提供了 API 的简明摘要,而后续 的 API 列表 表提供了详细的列表。

功能区域 说明 相关对象
Data types 现有 Excel 数据类型的扩展,包括对格式化数字和 Web 图像的支持。 ArrayCellValueBooleanCellValueCellValueAttributionAttributesCellValueProviderAttributesDoubleCellValueEmptyCellValueEntityCellValueFormattedNumberCellValueRootReferenceCellValueStringCellValueValueTypeNotAvailableCellValueWebImageCellValue
数据类型错误 支持扩展数据类型的错误对象。 BlockedErrorCellValueBusyErrorCellValueCalcErrorCellValueConnectErrorCellValueDiv0ErrorCellValueFieldErrorCellValueGettingDataErrorCellValueNotAvailableErrorCellValueNameErrorCellValueNullErrorCellValueNumErrorCellValuePlaceholderErrorCellValueRefErrorCellValueSpillErrorCellValueValueErrorCellValue
实体数据类型实体卡 实体是数据类型的容器。 卡片布局对象管理实体卡的显示。 EntityCellValueEntityCardLayoutEntityPropertyExtraPropertiesEntityViewLayoutsCardLayoutListSectionCardLayoutPropertyReferenceCardLayoutSectionStandardPropertiesCardLayoutStandardPropertiesCardLayoutTableSection

API 列表

下表列出了 Excel JavaScript API 要求集 1.16 中的 API。 若要查看 Excel JavaScript API 要求集 1.16 或更低版本支持的所有 API 的 API 参考文档,请参阅 要求集 1.16 或更低版本中的 Excel API

说明
ArrayCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
元素 表示数组的元素。
referencedValues 表示在 中 ArrayCellValue.elements引用的单元格值。
type 表示此单元格值的类型。
BlockedErrorCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
errorSubType 表示 的类型 BlockedErrorCellValue
errorType 表示 的类型 ErrorCellValue
type 表示此单元格值的类型。
BooleanCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
type 表示此单元格值的类型。
BusyErrorCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
errorSubType 表示 的类型 BusyErrorCellValue
errorType 表示 的类型 ErrorCellValue
type 表示此单元格值的类型。
CalcErrorCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
errorSubType 表示 的类型 CalcErrorCellValue
errorType 表示 的类型 ErrorCellValue
functionName 表示导致错误的函数的名称。
type 表示此单元格值的类型。
CardLayoutListSection 布局 表示此部分的布局类型。
CardLayoutPropertyReference property 表示卡片布局引用的属性的名称。
CardLayoutSectionStandardProperties 倒塌 表示卡片的此部分最初是否折叠。
湿 陷 性 表示卡片的此部分是否可折叠。
properties 表示此部分中的属性的名称。
title 表示卡片的此部分的标题。
CardLayoutStandardProperties mainImage 指定将用作卡片主图像的属性。
sections 表示卡片的各部分。
字幕 表示哪个属性包含卡片副标题的规范。
title 表示卡片的标题或包含卡片标题的属性的规范。
CardLayoutTableSection 布局 表示此部分的布局类型。
CellValueAttributionAttributes licenseAddress 表示描述如何使用此属性的许可证或源的 URL。
licenseText 表示管理此属性的许可证的名称。
sourceAddress 表示指向 的源的 CellValueURL。
sourceText 表示 的源 CellValue的名称。
CellValueExtraProperties 表示此 CellValue 是否将用于覆盖单元格。
writableNote 表示有关指定为 false 的原因 CellValue.writable 的说明。
CellValuePropertyMetadata 归 因 表示属性信息,用于描述使用此属性的源和许可证要求。
excludeFrom 表示从中排除此属性的功能。
sublabel 表示卡片视图中显示的此属性的子标签。
CellValuePropertyMetadataExclusions autoComplete True 表示属性已从自动完成显示的属性中排除。
calcCompare True 表示在重新计算期间从用于比较单元格值的属性中排除该属性。
cardView True 表示属性已从卡片视图显示的属性中排除。
dotNotation True 表示属性已从可通过 FIELDVALUE 函数访问的属性中排除。
CellValueProviderAttributes description 表示未指定徽标时在卡片视图中使用的提供程序说明属性。
logoSourceAddress 表示用于下载将在卡片视图中用作徽标的图像的 URL。
logoTargetAddress 表示用户在卡片视图中单击徽标元素时作为导航目标的 URL。
ChangedEventDetail valueAsJsonAfter 表示更改后的值的类型。
valueAsJsonBefore 表示更改前的值的类型。
ChartFill getSolidColor () 获取图表元素的统一颜色填充格式。
ConnectErrorCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
errorSubType 表示 的类型 ConnectErrorCellValue
errorType 表示 的类型 ErrorCellValue
type 表示此单元格值的类型。
Div0ErrorCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
errorType 表示 的类型 ErrorCellValue
type 表示此单元格值的类型。
DoubleCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
type 表示此单元格值的类型。
EmptyCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
type 表示此单元格值的类型。
EntityCardLayout 布局 表示此布局的类型。
EntityCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
布局 表示此实体视图的布局信息。
properties 表示此实体的属性及其元数据。
供应商 表示描述在此 EntityCellValue中提供数据的服务的信息。
referencedValues 表示在 中 EntityCellValue.properties引用的单元格值。
text 表示呈现具有此值的单元格时显示的文本。
type 表示此单元格值的类型。
EntityCompactLayout icon 指定用于打开卡片的图标的名称。
EntityPropertyExtraProperties propertyMetadata 表示有关 属性的元数据。
EntityViewLayouts 表示卡片视图中此实体的布局。
紧凑 表示在空间有限时用于表示实体的布局。
ExternalErrorCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
errorSubType 表示 的类型 ExternalErrorCellValue
errorType 表示 的类型 ErrorCellValue
type 表示此单元格值的类型。
FieldErrorCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
errorSubType 表示 的类型 FieldErrorCellValue
errorType 表示 的类型 ErrorCellValue
fieldName 表示 FIELDVALUE 未找到的字段。
type 表示此单元格值的类型。
FormattedNumberCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
numberFormat 返回用于显示此值的数字格式字符串。
type 表示此单元格值的类型。
GettingDataErrorCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
errorType 表示 的类型 ErrorCellValue
type 表示此单元格值的类型。
LinkedEntityCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
cardLayout 表示卡片视图中此链接实体的布局。
id 表示在此值中提供信息的服务源。
properties 表示此链接实体的属性及其元数据。
供应商 表示描述在此 LinkedEntityCellValue中提供数据的服务的信息。
text 表示呈现具有此值的单元格时显示的文本。
type 表示此单元格值的类型。
LinkedEntityId 文化 表示用于创建此 CellValue的语言区域性。
domainId 表示特定于用于创建 的服务的 CellValue域。
entityId 表示特定于用于创建 的服务的 CellValue标识符。
服务 Id 表示用于创建 的服务 CellValue
NameErrorCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
errorType 表示 的类型 ErrorCellValue
type 表示此单元格值的类型。
NamedItem valueAsJson 此命名项中值的 JSON 表示形式。
valueAsJsonLocal 此命名项中值的 JSON 表示形式。
NamedItemArrayValues valuesAsJson 此命名项数组中值的 JSON 表示形式。
valuesAsJsonLocal 此命名项数组中值的 JSON 表示形式。
NotAvailableErrorCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
errorType 表示 的类型 ErrorCellValue
type 表示此单元格值的类型。
NullErrorCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
errorType 表示 的类型 ErrorCellValue
type 表示此单元格值的类型。
NumErrorCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
errorSubType 表示 的类型 NumErrorCellValue
errorType 表示 的类型 ErrorCellValue
functionName 表示导致错误的函数的名称。
type 表示此单元格值的类型。
PlaceholderErrorCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
errorType 表示 的类型 ErrorCellValue
target PlaceholderErrorCellValue 在处理期间使用 ,同时下载数据。
type 表示此单元格值的类型。
区域 valuesAsJson 此区域中单元格中值的 JSON 表示形式。
valuesAsJsonLocal 此区域中单元格中值的 JSON 表示形式。
RangeView valuesAsJson 此区域中单元格中值的 JSON 表示形式。
valuesAsJsonLocal 此区域中单元格中值的 JSON 表示形式。
RefErrorCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
errorSubType 表示 的类型 RefErrorCellValue
errorType 表示 的类型 ErrorCellValue
type 表示此单元格值的类型。
ReferenceCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
reference 表示单元格值(如 和 ArrayCellValueEntityCellValue属性中的referencedValues索引。
type 表示此单元格值的类型。
RootReferenceCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
type 表示此单元格值的类型。
SpillErrorCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
columnCount 表示在没有#SPILL时会溢出的列数! 错误。
errorSubType 表示 的类型 SpillErrorCellValue
errorType 表示 的类型 ErrorCellValue
rowCount 表示在没有#SPILL时会溢出的行数! 错误。
type 表示此单元格值的类型。
StringCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
type 表示此单元格值的类型。
TableColumn valuesAsJson 此表列中单元格中的值的 JSON 表示形式。
valuesAsJsonLocal 此表列中单元格中的值的 JSON 表示形式。
TableColumnCollection addAsJson (index?: number, values?: CellValue[][], name?: string) 向表中添加新列。
TableRow valuesAsJson 此表行单元格中值的 JSON 表示形式。
valuesAsJsonLocal 此表行单元格中值的 JSON 表示形式。
TableRowCollection addAsJson (index?: number, values?: CellValue[][][], alwaysInsert?: boolean) 向表中添加一行或多行。
ValueErrorCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
errorSubType 表示 的类型 ValueErrorCellValue
errorType 表示 的类型 ErrorCellValue
type 表示此单元格值的类型。
ValueTypeNotAvailableCellValue basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
type 表示此单元格值的类型。
WebImageCellValue address 表示将从中下载图像的 URL。
altText 表示可在辅助功能方案中用于描述图像所表示内容的备用文本。
归 因 表示属性信息,用于描述使用此映像的源和许可证要求。
basicType 表示将为具有此值的单元格返回 Range.valueTypes 的值。
basicValue 表示将为具有此值的单元格返回 Range.values 的值。
供应商 表示描述提供图像的实体或个人的信息。
relatedImagesAddress 表示网页的 URL,其中包含被视为与此 WebImageCellValue相关的图像。
type 表示此单元格值的类型。
Workbook getLinkedEntityCellValue (linkedEntityCellValueId: LinkedEntityId) LinkedEntityCellValue基于提供的 LinkedEntityId返回 。

另请参阅