Excel.ArrayCellValue interface
セル値の 2D 配列を表します。
注釈
例
const sheet = context.workbook.worksheets.getActiveWorksheet();
// This `EntityCellValue` contains an `ArrayCellValue` with two products and their prices.
const myEntity: Excel.EntityCellValue = {
type: Excel.CellValueType.entity,
text: "Product Catalog",
properties: {
items: {
type: Excel.CellValueType.array, /* ArrayCellValue */
elements: [[
{
type: Excel.CellValueType.string,
basicValue: "Bicycle"
},
{
type: Excel.CellValueType.double,
basicValue: 300,
numberFormat: "$* #,##0.00",
}
],
[
{
type: Excel.CellValueType.string,
basicValue: "Helmet"
},
{
type: Excel.CellValueType.double,
basicValue: 25,
numberFormat: "$* #,##0.00",
}
]],
basicType: Excel.RangeValueType.error,
basicValue: "#VALUE!"
}
},
basicType: Excel.RangeValueType.error, // A read-only property. Used as a fallback in incompatible scenarios.
basicValue: "#VALUE!" // A read-only property. Used as a fallback in incompatible scenarios.
};
sheet.getCell(0,0).valuesAsJson = [[myEntity]];
プロパティ
| basic |
この値を持つセルの |
| basic |
この値を持つセルの |
| elements | 配列の要素を表します。
|
| referenced |
|
| type | このセル値の型を表します。 |
プロパティの詳細
basicType
この値を持つセルの Range.valueTypes によって返される値を表します。
basicType?: RangeValueType.error | "Error";
プロパティ値
error | "Error"
注釈
basicValue
この値を持つセルの Range.values によって返される値を表します。
valuesAsJson プロパティを介してアクセスすると、この文字列値は en-US ロケールに合わせて調整されます。
valuesAsJsonLocal プロパティを介してアクセスすると、この文字列値はユーザーの表示ロケールと一致します。
basicValue?: "#VALUE!" | string;
プロパティ値
"#VALUE!" | string
注釈
elements
配列の要素を表します。
ArrayCellValue
が直接含まれていない場合があります。
elements: CellValue[][];
プロパティ値
Excel.CellValue[][]
注釈
referencedValues
ArrayCellValue.elements
内で参照されるセル値を表します。
referencedValues?: ReferencedValue[];
プロパティ値
注釈
type
このセル値の型を表します。
type: CellValueType.array | ReferenceValueType.array | "Array";