Excel.CellPropertiesLoadOptions interface
"range.getCellProperties" メソッドの一部として使用する場合に読み込むセル プロパティを表します。
プロパティ
| address |
|
| address |
|
| format |
|
| hidden |
|
| hyperlink |
|
| style |
|
プロパティの詳細
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();
// Define the cell properties to get by setting the matching LoadOptions to true.
const propertiesToGet = cell.getCellProperties({
address: true,
format: {
fill: {
color: true
},
font: {
color: true
}
},
style: true
});
// Sync to get the data from the workbook.
await context.sync();
const cellProperties = propertiesToGet.value[0][0];
console.log(
`Address: ${cellProperties.address}\nStyle: ${cellProperties.style}\nFill Color: ${cellProperties.format.fill.color}\nFont Color: ${cellProperties.format.font.color}`);
});
addressLocal
format
format プロパティに読み込むかどうかを指定します。
format?: Excel.CellPropertiesFormatLoadOptions;