spitableRow

新建Api表Row

类表示表列

方法论

名称 描述性
添加Rows

向当前表添加新行

清除

清除当前行内容

GetCell系统

依位置返回单元格

GetCellsCount

返回当前行数单元格

GetClassType系统

返回类型Api表Row类

GetIndex

返回当前行索引

GetNext

返回下一行如果存在

获取父表

返回当前行父表

获取前置

返回前行 if exist

合并ells

合并当前行中的单元格

删除

删除当前表列

搜索

查找表列对象范围搜索结果集合Apirange对象

SetBackgroundColor

设置当前表列中所有单元格的背景色

塞特海尔

设置当前表列高度

集表头

指定当前表列在每个新页顶部重复显示这使表列显示页眉行在每一页上的行为元素可应用到表结构顶部数行生成多行表页眉

SetTextPr

设置文本属性为当前行

ToJSON系统

转换Api表RowPr对象为JSON对象

实例

拷贝代码
builder.CreateFile("docx")!varoDocuments=api.GetDocumentvar表Style=ODocument.CreateStyleoTableStyle.SetBasedOn(oDocument.GetStyle("Bordered"))!varo表=api.Criate表(3,3)oTable.SetWidth("percent", 100)!var表列=o表.getRow0oTableRow.SetHeight("atLeast", 720)!tableRow.AddRows(1,真)tableRow=otable.getRow0varocelloCell.SetVerticalAlign("bottom")!varodents=oCell.GetContentsoParagraph.AddText("Align bottom")!varnCellsCount=otableRow.GetCellsCountoTableRow.GetCell(0).GetContent().GetElement(0).AddText("Row index: " + oTableRow.GetIndex())!表Row=oTable.GetRowoTableRow.GetCell(0).GetContent().GetElement(0).AddText("Second row")!oTableRow.GetNext().GetCell(0).GetContent().GetElement(0).AddText("Third row")!oTableRow.GetPrevious().GetCell(1).GetContent().GetElement(0).SetBold(true)!tableRow =otable.getRowoTableRow.MergeCells()!oTable.SetStyle(oTableStyle)!oDocument.Push(oTable)!odeptes = Api.Createlementsoclits.adText ("第一行数=+nCellsCount)var slassType =otableRow.GetClassTypeoParagraph.AddLineBreak()!odstext (slass类型=+ssstype)oDocument.Push(oParagraph)!builder.SaveFile("docx", "ApiTableRow.docx")!builder.CloseFile();

结果文档