Compartir a través de


Excel.CheckboxCellControl interface

Representa una casilla. Se trata de un control de celda que permite a un usuario alternar el valor booleano de una celda.

Comentarios

[ Conjunto de API: ExcelApi 1.18 ]

Ejemplos

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-cell-control.yaml

// Add checkboxes to the table.
await Excel.run(async (context) => {
  const sheet = context.workbook.worksheets.getActiveWorksheet();

  // Get the second column in the table, without the header.
  const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange();

  // Change the boolean values to checkboxes.
  range.control = {
    type: Excel.CellControlType.checkbox
  };
  await context.sync();
});

Propiedades

type

Detalles de las propiedades

type

type: CellControlType.checkbox;

Valor de propiedad