当前位置: 代码迷 >> Office >> openoffice报表操作相关的一些宏例子
  详细解决方案

openoffice报表操作相关的一些宏例子

热度:4558   发布时间:2013-02-26 00:00:00.0
openoffice表格操作相关的一些宏例子
Sub Main
dim table as object
r_Tables = thiscomponent.getTextTables()
iCount = r_Tables.getCount
'msgbox iCount
tTableNames = r_Tables.getElementNames
for i = 0 to iCount-1
    if tTableNames(i) = "table"then
        table = r_Tables.getByName("table")
        end if
next i
oTableCursor = table.createCursorByCellName("A1")
'oTableCursor.splitRange(2,true)
oTableCursor.goDown(2,true)
'oTableCursor.gotoCellByName("A3",true)
oTableCursor.splitRange(4,false)
End Sub