Open
Description
When I run the following code snippet, it runs indefinitely without performing any action:
function main(workbook: ExcelScript.Workbook) {
const rangeDataValidation = workbook.getActiveWorksheet().getRange("B2:B5").getDataValidation();
rangeDataValidation.setRule({
list: {
inCellDropDown: true,
source: workbook.getWorksheet("Data").getRange("A1:A3")
}
});
}
However, when I run the following code:
function main(workbook: ExcelScript.Workbook) {
const rangeDataValidation = workbook.getActiveWorksheet().getRange("B2:B5").getDataValidation();
rangeDataValidation.setRule({
list: {
inCellDropDown: true,
source: "test1,test2,test3"
}
});
}
Everything works as expected. Am I doing something wrong with the cell range in the first code snippet?
(If this is not the appropriate place for this issue, please redirect me to the correct repository.)
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
- ID: eec6dad6-3b54-5f6f-6792-6f8b85bcb13c
- Version Independent ID: 0558dc94-2b87-5ab5-8a9b-5117f12acf8d
- Content: ExcelScript.ListDataValidation interface - Office Scripts
- Content Source: docs/docs-ref-autogen/excel/excelscript/excelscript.listdatavalidation.yml
- Service: excel
- Sub-service: scripts
- GitHub Login: @o365devx
- Microsoft Alias: o365devx