等同于
Workbooks(ThisWorkbook.Name)
在libre office macro(StarBasic)
我想使用像
这样的工作簿(ThisWorkbook.Name)以下
With Workbooks(ThisWorkbook.Name)
While (.Worksheets(ConstData.Detail).Range(ConstData.detailDtId + CStr(count)).Value <> 0)
//Some Code
Wend
End With
如何在Libre Office Calc Macro中执行此操作
答案 0 :(得分:1)
Open Office BASIC指南中的一个例子:
Dim Doc As Object
Dim Sheet As Object
Dim CellRange As Object
Doc = ThisComponent
Sheet = Doc.Sheets.getByName("Sheet 1")
CellRange = Sheet.getCellRangeByName("A1:C15")
MsgBox CellRange.computeFunction(com.sun.star.sheet.GeneralFunction.AVERAGE)
http://wiki.openoffice.org/wiki/Documentation/BASIC_Guide/Structure_of_Spreadsheets http://wiki.openoffice.org/wiki/Documentation/BASIC_Guide/Editing_Spreadsheet_Documents