Edit

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.

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

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

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.

textRuns?: boolean;

Property Value

boolean

Remarks

API set: ExcelApi 1.18