Skip to content

Commit 6aba60c

Browse files
Apply suggestions from code review
Co-authored-by: Alex Jerabek <[email protected]>
1 parent 5cc493d commit 6aba60c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

samples/excel/42-range/range-cell-control.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ script:
1919
const sheet = context.workbook.worksheets.getActiveWorksheet();
2020
2121
// Get the second column in the table.
22-
const range = sheet.getRange("FruitTable").getColumn(1);
22+
const range = sheet.tables.getItem("FruitTable").columns.getItem("Analysis").getDataBodyRange();
2323
2424
// Change the boolean values to checkboxes.
2525
range.control = {
@@ -89,7 +89,8 @@ script:
8989
["Mango", "TRUE"],
9090
["Dog", "FALSE"],
9191
["Strawberry", "TRUE"],
92-
["Chair", "FALSE"]
92+
["Chair", "FALSE"],
93+
["Tomato", "UNKNOWN"] /* Only boolean values will render as checkboxes. */
9394
]);
9495
9596
sheet.getUsedRange().format.autofitColumns();

0 commit comments

Comments
 (0)