scripting - LibreOffice Calc Basic:getCellByPosition 给出 outOfBoundsException
问题描述
我在 Calc 文件中有以下宏:
Dim oDoc as Object
oDoc=ThisComponent
Dim oSheets as Object
oSheets = oDoc.Sheets
Dim oController as Object
oController = oDoc.getCurrentController()
Dim numVisibleSheet
numVisibleSheet = oController.VisibleRange.Sheet
Dim currentSheet as Object
currentSheet = oController.ActiveSheet
currentSheet = oSheets.getByIndex(numVisibleSheet)
MsgBox "ok"
cell = currentSheet.getCellByPosition(5000, 5)
cell.setString("toto")
当我在 LibreOffice 7 上运行它时,我在 cellsuno.cxx 中得到一个“outOfBoundsException”。
我对 getCellByPosition 的使用不好吗?单元格的 x 和 y 坐标是否有界限,如果有,我该如何扩展这些界限?
谢谢!
解决方案
推荐阅读
- javascript - 如何在 Cordova 上为请求标头设置特定来源?
- javascript - 如何让我的不和谐机器人列出某个角色的人?
- react-native - 警告:函数作为 React 子级无效。(反应原生)
- python - 估计基于对极的姿势恢复的相机焦距
- javascript - 如何在反应中的3个数字后插入逗号
- python - 按下按钮时如何将按钮值添加到 django 表单字段
- django - Django Import Export,如何在excel中导入特定工作表?
- android - 我不能将上下文传递给适配器类
- pandas - 熊猫数据透视表重新索引会失去利润?
- css - 数独网格样式-边框 [CSS-Grid]