Excel.CellControlType enum
Represents the type of cell control.
Remarks
Examples
// 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();
});
Fields
checkbox = "Checkbox" | Type representing a checkbox control. |
dropdown = "Dropdown" | Type representing a dropdown control. |
empty = "Empty" | Type representing an empty control. |
mixed = "Mixed" | Type representing a query that results in a mix of control results. |
unknown = "Unknown" | Type representing an unknown control. This represents a control that was added in a future version of Excel, and the current version of Excel doesn't know how to display this control. |