Excel.CellPropertiesFillLoadOptions interface

Specifies which properties to load on the format.fill object.

Remarks

[ API set: ExcelApi 1.9 ]

Properties

color

Specifies whether to load the color property.

pattern

Specifies whether to load the pattern property.

patternColor

Specifies whether to load the patternColor property.

patternTintAndShade

Specifies whether to load the patternTintAndShade property.

tintAndShade

Specifies whether to load the tintAndShade property.

Property Details

color

Specifies whether to load the color property.

color?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

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}`);
});

pattern

Specifies whether to load the pattern property.

pattern?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

patternColor

Specifies whether to load the patternColor property.

patternColor?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

patternTintAndShade

Specifies whether to load the patternTintAndShade property.

patternTintAndShade?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

tintAndShade

Specifies whether to load the tintAndShade property.

tintAndShade?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]