Excel.CellPropertiesFillLoadOptions interface

Указывает, какие свойства следует загрузить в format.fill объект .

Комментарии

Набор API: ExcelApi 1.9

Используется

Свойства

color

Указывает, следует ли загружать color свойство.

pattern

Указывает, следует ли загружать pattern свойство.

patternColor

Указывает, следует ли загружать patternColor свойство.

patternTintAndShade

Указывает, следует ли загружать patternTintAndShade свойство.

tintAndShade

Указывает, следует ли загружать tintAndShade свойство.

Сведения о свойстве

color

Указывает, следует ли загружать color свойство.

color?: boolean;

Значение свойства

boolean

Комментарии

Набор API: ExcelApi 1.9

Примеры

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

Указывает, следует ли загружать pattern свойство.

pattern?: boolean;

Значение свойства

boolean

Комментарии

Набор API: ExcelApi 1.9

patternColor

Указывает, следует ли загружать patternColor свойство.

patternColor?: boolean;

Значение свойства

boolean

Комментарии

Набор API: ExcelApi 1.9

patternTintAndShade

Указывает, следует ли загружать patternTintAndShade свойство.

patternTintAndShade?: boolean;

Значение свойства

boolean

Комментарии

Набор API: ExcelApi 1.9

tintAndShade

Указывает, следует ли загружать tintAndShade свойство.

tintAndShade?: boolean;

Значение свойства

boolean

Комментарии

Набор API: ExcelApi 1.9