Excel.CellProperties interface

表示 getCellProperties 的返回属性。

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

    // 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();
    const activeCellProperties: Excel.CellProperties = cellProperties.value[0][0];
    console.log(JSON.stringify(activeCellProperties, null, 2));
});

属性

address

表示address属性。

API 集:ExcelApi 1.9

addressLocal

表示addressLocal属性。

API 集:ExcelApi 1.9

hidden

表示hidden属性。

API 集:ExcelApi 1.9

属性详细信息

address

表示address属性。

API 集:ExcelApi 1.9

address?: string;

属性值

string

addressLocal

表示addressLocal属性。

API 集:ExcelApi 1.9

addressLocal?: string;

属性值

string

hidden

表示hidden属性。

API 集:ExcelApi 1.9

hidden?: boolean;

属性值

boolean