0
我不能再使用Cells(x,y)
在OpenOffice(似乎是一個bug,從我可以蒐集的搜索結果中搜索Cells.select
)。有沒有解決方法(用不同的代碼)?當然,我需要回應從Cells(x,y)
返回的值。OpenOffice 3.3打破我的代碼
的錯誤是:
unsatisfied query of type ooo.vba.excel.XWorksheet!
我不能再使用Cells(x,y)
在OpenOffice(似乎是一個bug,從我可以蒐集的搜索結果中搜索Cells.select
)。有沒有解決方法(用不同的代碼)?當然,我需要回應從Cells(x,y)
返回的值。OpenOffice 3.3打破我的代碼
的錯誤是:
unsatisfied query of type ooo.vba.excel.XWorksheet!
要麼一切都改變了3.3,或者他們只是打破了事故的一切。最可能的情況是,我使用的所有東西都已被棄用,但可能會暫時中斷。
在任何情況下,您都不能再使用裸體Cells(y,x)
。現在,你必須使用
Sheet = ThisComponent.getCurrentController.getActiveSheet
Cell = Sheet.getCellByPosition(x, y)
注:
的文檔是here(感謝@Tim威廉姆斯谷歌的支持)。
與單元格不同,x和y現在是「正常」(列,行),而不是反轉。此外,該指數是從零開始的。
要選擇你要使用
獲取活動單元的單元
oCell = ThisComponent.getCurrentSelection()
If not oCell.supportsService("com.sun.star.sheet.SheetCell") Then
return
End If
' do stuff here
你試過轉換,爲一個範圍()的參考,或許列(y).Cells(x)或Rows(x).Cells(y)? – 2011-03-24 20:48:06
有點谷歌搜索從來沒有傷害:http://wiki.services.openoffice.org/wiki/Documentation/BASIC_Guide/Cells_and_Ranges – 2011-03-25 00:25:51
感謝@Tim威廉姆斯幫助。我從我在那裏找到的答案中回答了一個問題。 – 2011-03-30 19:24:19