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
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
本文介绍了一种操作文本中表格的方法,包括获取表格数量、通过名称访问指定表格及在特定单元格进行操作的过程。演示了如何使用编程语言定位并修改文档内的表格。
638

被折叠的 条评论
为什么被折叠?



