【发布时间】:2019-06-27 15:35:49
【问题描述】:
我特别想在一个数组上调用这个函数:
从文档中确实不清楚要完成这项工作需要什么。我肯定在这里遗漏了一些东西。以下是我的代码的当前状态。
我还检查了我正在构建的加载项是否在使用 API v1.9 的 Excel 版本中运行。
我尝试设置与 cellPropertiesLoadOptions 描述的接口匹配的各种对象 - 但再次不确定文档中的实际要求是什么。
async function getFormatsForCellRange () {
return await Excel.run(async context => {
const table = await context.workbook.tables.getItem(observationConst.TABLE_NAME)
const range = table.getRange()
const cellProperties = range.getCellProperties()
console.log(cellProperties)
})
}
文档说明调用 getCellProperties 的结果应该是一个二维数组。
【问题讨论】:
-
抱歉,我的意思是在 Range 上调用 getCellProperties。
-
请查看stackoverflow.com/a/55466639/678505上的答案,其中给出了API调用的示例。
-
非常感谢,我以为我遗漏了一些简单的东西。
标签: office-js