Excel.CellPropertiesLoadOptions interface
"range.getCellProperties" メソッドの一部として使用する場合に読み込むセル プロパティを表します。
プロパティ
| address |
|
| address |
|
| format |
|
| hidden |
|
| hyperlink |
|
| style |
|
| text |
|
プロパティの詳細
address
address プロパティに読み込むかどうかを指定します。
address?: boolean;
プロパティ値
boolean
例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/cell-properties.yaml
await Excel.run(async (context) => {
const cell = context.workbook.getActiveCell();
// Get only the properties requested in this load-options object.
const propertiesToGet: Excel.CellPropertiesLoadOptions = {
address: true,
format: {
fill: {
color: true
},
font: {
bold: true,
color: true
}
},
style: true
};
const cellProperties = cell.getCellProperties(propertiesToGet);
await context.sync();
const activeCellProperties: Excel.CellProperties = cellProperties.value[0][0];
console.log(JSON.stringify(activeCellProperties, null, 2));
});
addressLocal
format
format プロパティに読み込むかどうかを指定します。
format?: Excel.CellPropertiesFormatLoadOptions;