Excel.DoubleCellValue interface
double を含むセルの値を表します。
注釈
プロパティ
| basic |
この値を持つセルの |
| basic |
この値を持つセルの |
| layouts | この二重値のビューのレイアウト情報を表します。 |
| number |
この値を表示するために使用される数値書式指定文字列を返します。
|
| properties | この二重値の追加プロパティを表します。 |
| provider | この |
| referenced |
|
| type | このセル値の型を表します。 |
プロパティの詳細
basicType
この値を持つセルの Range.valueTypes によって返される値を表します。
basicType?: RangeValueType.double | "Double";
プロパティ値
double | "Double"
注釈
basicValue
この値を持つセルの Range.values によって返される値を表します。
basicValue: number;
プロパティ値
number
注釈
layouts
この二重値のビューのレイアウト情報を表します。
layouts?: BasicViewLayouts;
プロパティ値
注釈
numberFormat
この値を表示するために使用される数値書式指定文字列を返します。
valuesAsJson プロパティを介してアクセスすると、この数値書式指定文字列は en-US ロケールになります。
valuesAsJsonLocal プロパティを介してアクセスすると、この数値形式はユーザーの表示ロケールになります。 数値書式指定文字列は、Excel のガイドラインに準拠している必要があります。 詳細については、「数値形式をカスタマイズするためのガイドラインを確認する」を参照してください。
numberFormat?: string;
プロパティ値
string
注釈
例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/20-data-types/data-types-formatted-number.yaml
// This function creates a double data type,
// and sets the format of this data type as a currency.
await Excel.run(async (context) => {
// Get the Sample worksheet and a range on that sheet.
const sheet = context.workbook.worksheets.getItemOrNullObject("Sample");
const currencyRange = sheet.getRange("A2");
// Write a number formatted as currency to cell A2.
currencyRange.valuesAsJson = [
[
{
type: Excel.CellValueType.double,
basicValue: 12.34,
numberFormat: "$* #,##0.00"
}
]
];
await context.sync();
});
properties
この二重値の追加プロパティを表します。
properties?: {
[key: string]: EntityPropertyType;
};
プロパティ値
{ [key: string]: Excel.EntityPropertyType; }
注釈
provider
この DoubleCellValueのデータを提供したサービスを説明する情報を表します。 この情報は、カード ビューのブランド化に使用できます。
provider?: CellValueProviderAttributes;
プロパティ値
注釈
referencedValues
DoubleCellValue.properties
内で参照されるセル値を表します。
referencedValues?: ReferencedValue[];
プロパティ値
注釈
type
このセル値の型を表します。
type: CellValueType.double | ReferenceValueType.double | "Double";
プロパティ値
注釈
例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/20-data-types/data-types-formatted-number.yaml
// This function creates a double data type,
// and sets the format of this data type as a date.
await Excel.run(async (context) => {
// Get the Sample worksheet and a range on that sheet.
const sheet = context.workbook.worksheets.getItemOrNullObject("Sample");
const dateRange = sheet.getRange("A1");
// Write a number formatted as a date to cell A1.
dateRange.valuesAsJson = [
[
{
type: Excel.CellValueType.double,
basicValue: 32889.0,
numberFormat: "m/d/yyyy"
}
]
];
await context.sync();
});