Excel.CellPropertiesLoadOptions interface

Represents which cell properties to load, when used as part of a "range.getCellProperties" method.

[ API set: ExcelApi 1.9 ]

Properties

address

Specifies whether to load on the address property.

[ API set: ExcelApi 1.9 ]

addressLocal

Specifies whether to load on the addressLocal property.

[ API set: ExcelApi 1.9 ]

format

Specifies whether to load on the format property.

[ API set: ExcelApi 1.9 ]

hidden

Specifies whether to load on the hidden property.

[ API set: ExcelApi 1.9 ]

hyperlink

Specifies whether to load on the hyperlink property.

[ API set: ExcelApi 1.9 ]

style

Specifies whether to load on the style property.

[ API set: ExcelApi 1.9 ]

textRuns

Specifies whether to load on the textRuns property.

[ API set: RangeTextRun ]

Property Details

address

Specifies whether to load on the address property.

[ API set: ExcelApi 1.9 ]

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();

    // 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

Specifies whether to load on the addressLocal property.

[ API set: ExcelApi 1.9 ]

addressLocal?: boolean;

Property Value

boolean

format

Specifies whether to load on the format property.

[ API set: ExcelApi 1.9 ]

format?: Excel.CellPropertiesFormatLoadOptions;

Property Value

hidden

Specifies whether to load on the hidden property.

[ API set: ExcelApi 1.9 ]

hidden?: boolean;

Property Value

boolean

Specifies whether to load on the hyperlink property.

[ API set: ExcelApi 1.9 ]

hyperlink?: boolean;

Property Value

boolean

style

Specifies whether to load on the style property.

[ API set: ExcelApi 1.9 ]

style?: boolean;

Property Value

boolean

textRuns

Specifies whether to load on the textRuns property.

[ API set: RangeTextRun ]

textRuns?: boolean;

Property Value

boolean