Excel.CellPropertiesLoadOptions interface
Represents which cell properties to load, when used as part of a "range.getCellProperties" method.
Properties
| address | Specifies whether to load on the |
| address |
Specifies whether to load on the |
| format | Specifies whether to load on the |
| hidden | Specifies whether to load on the |
| hyperlink | Specifies whether to load on the |
| style | Specifies whether to load on the |
| text |
Specifies whether to load on the |
Property Details
address
Specifies whether to load on the address property.
address?: boolean;
Property Value
boolean
Examples
// 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();
console.log(JSON.stringify(cellProperties.value[0][0], null, 2));
});
addressLocal
Specifies whether to load on the addressLocal property.
addressLocal?: boolean;
Property Value
boolean
format
Specifies whether to load on the format property.
format?: Excel.CellPropertiesFormatLoadOptions;
Property Value
hidden
Specifies whether to load on the hidden property.
hidden?: boolean;
Property Value
boolean
hyperlink
Specifies whether to load on the hyperlink property.
hyperlink?: boolean;
Property Value
boolean
style
Specifies whether to load on the style property.
style?: boolean;
Property Value
boolean
textRuns
Specifies whether to load on the textRuns property.
textRuns?: boolean;
Property Value
boolean