读书人

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

发布时间: 2012-11-13 10:00:51 作者: rapoo

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

读书人网 >OFFICE教程

热点推荐