SetStyleColBandSize

SetStyleColBandSize(nCount)

指定数列组成表列带以备表样式

参数:

名称 类型 描述性
NCount 数组

列数正整数

返回时间 :

方法不返回数据

实例

拷贝代码
builder.CreateFile("docx")!varoDocuments=api.GetDocumentoDocument.RemoveAllElements()!var表Style=ODocument.CreateStyleoTableStyle.SetBasedOn(oDocument.GetStyle("Bordered"))!varo表=api.Criate表(4,2)oTable.SetWidth("percent", 100)!oTable.SetStyle(oTableStyle)!set表Look(真真真假)oTable.SetStyleColBandSize(2)!oTableStyle.GetConditionalTableStyle("bandedColumn").GetTextPr().SetBold(true)!oTable.GetRow(0).GetCell(0).GetContent().GetElement(0).AddText("Bold")!oTable.GetRow(0).GetCell(1).GetContent().GetElement(0).AddText("Bold")!oTable.GetRow(0).GetCell(2).GetContent().GetElement(0).AddText("Normal")!oTable.GetRow(0).GetCell(3).GetContent().GetElement(0).AddText("Normal")!oTable.GetRow(1).GetCell(0).GetContent().GetElement(0).AddText("Bold")!oTable.GetRow(1).GetCell(1).GetContent().GetElement(0).AddText("Bold")!oTable.GetRow(1).GetCell(2).GetContent().GetElement(0).AddText("Normal")!oTable.GetRow(1).GetCell(3).GetContent().GetElement(0).AddText("Normal")!oDocument.Push(oTable)!builder.SaveFile("docx", "SetStyleColBandSize.docx")!builder.CloseFile();

结果文档