CascadeOptions.Count(属性)
说明
可读写
级联字段的选项数
返回值
Number
浏览器环境示例
javascript
async function example() {
await instance.ready();
const app = instance.Application;
const descript = await app.Sheets(1).FieldDescriptors(2)
const CascadeOption = await descript.AllCascadeOption
const count = await CascadeOption.Count
if (count === 0) {
CascadeOption.Add("ADD 1")
descript.Apply()
}
}
脚本编辑器 示例
javascript
function main() {
const descript = Application.Sheets(1).FieldDescriptors(2)
const CascadeOption = descript.AllCascadeOption
const count = CascadeOption.Count
if (count === 0) {
CascadeOption.Add("ADD 1")
descript.Apply()
}
}
main()