GetConditionalTableStyle

获取条件表Stylespi表寄存器}

返回一组格式化属性,这些属性将有条件应用到表格中符合stype参数中具体要求的部分

参数:

名称 类型 默认 描述性
sType系统 TableStyleOverrideType 全表

表段格式化属性应用

返回时间 :

类型
spi表寄存器

实例

拷贝代码
builder.CreateFile("docx")!varoDocuments=api.GetDocumentvaro表=api.Criate表2oTable.SetWidth("percent", 100)!oDocument.Push(oTable)!var表Style=ODocument.CreateStyleoTable.SetStyle(oTableStyle)!set表Look(真真真假)tableStyle.GettablePr (.SettableFlorTop)tableStyle.GettablePr (.Settable边界Bottom)TableStyle.GetTablePr (.SetTableLeft)tableStyle.GettablePr (.Set表边RightstableStyle.GetTablePr (.SetTable边框VV.tableStyle.GetTablePr (.Set表边界H.oTableStyle.GetConditionalTableStyle("bandedColumn").GetTextPr().SetItalic(true)!varoCellContent =otable.GetRow0.GetCell0.GetCell0.Contentvarodente=oCellContent.getEplement0odText (sell字体设置为斜体)oCellContent = oTable.GetRow(1).GetCell(0).GetContent()!Objects=OCellContent.GetEplement0odText (“本单元格字体也设置为斜体”)oCellContent = oTable.GetRow(0).GetCell(1).GetContent()!Objects=OCellContent.GetEplement0odText (Cell字体仍然默认)oCellContent = oTable.GetRow(1).GetCell(1).GetContent()!Objects=OCellContent.GetEplement0odText (Cell字体仍然默认)builder.SaveFile("docx", "GetConditionalTableStyle.docx")!builder.CloseFile();

结果文档