【发布时间】:2020-07-07 11:37:33
【问题描述】:
我正在尝试通过office JS模仿excel本身提供的以下功能,我可以在excel中选择一个表格列并在左侧插入一个新列:
我知道我可以使用索引参数通过Excel.TableColumnCollection.add(index, values, name) 方法插入列:
index
number
Optional. Specifies the relative position of the new column.
If null or -1, the addition happens at the end.
Columns with a higher index will be shifted to the side. Zero-indexed.
但是如何在表格中找到所选列的索引?我知道如何获取选定的范围,而不是表的选定列索引。
提前感谢您的帮助。
【问题讨论】:
标签: office-js