Excel.CellPropertiesFillLoadOptions interface

指定要在format.fill对象上加载的属性。Specifies which properties to load on the format.fill object.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

属性

color

指定是否在color属性上进行加载。Specifies whether to load on the color property.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

pattern

指定是否在pattern属性上进行加载。Specifies whether to load on the pattern property.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

patternColor

指定是否在patternColor属性上进行加载。Specifies whether to load on the patternColor property.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

patternTintAndShade

指定是否在patternTintAndShade属性上进行加载。Specifies whether to load on the patternTintAndShade property.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

tintAndShade

指定是否在tintAndShade属性上进行加载。Specifies whether to load on the tintAndShade property.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

属性详细信息

color

指定是否在color属性上进行加载。Specifies whether to load on the color property.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

color?: boolean;

属性值

boolean

示例Examples

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属性上进行加载。Specifies whether to load on the pattern property.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

pattern?: boolean;

属性值

boolean

patternColor

指定是否在patternColor属性上进行加载。Specifies whether to load on the patternColor property.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

patternColor?: boolean;

属性值

boolean

patternTintAndShade

指定是否在patternTintAndShade属性上进行加载。Specifies whether to load on the patternTintAndShade property.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

patternTintAndShade?: boolean;

属性值

boolean

tintAndShade

指定是否在tintAndShade属性上进行加载。Specifies whether to load on the tintAndShade property.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

tintAndShade?: boolean;

属性值

boolean