设号Wrap

SetNoWrap(isNoWrap)

指定当前表单显示文档时如何显示父表本设置只影响单元格行为ApiTablePr#SetTableLayout表布局设置使用高超性算法

参数:

名称 类型 描述性
无Wrap 布林安

真实值表示当前表单元格不包嵌父表

返回时间 :

方法不返回数据

实例

拷贝代码
builder.CreateFile("docx")!varoDocuments=api.GetDocumentvarolements=ODocument.GetEplement0var表Style=ODocument.CreateStyleoTableStyle.SetBasedOn(oDocument.GetStyle("Bordered"))!var表Pr =o表Style.get表Prvaro表=api.Criate表(3,3)oTablePr.SetTableLayout("autofit")!set表Look(真真假)oTable.SetStyle(oTableStyle)!varocell =otable.GetRow0.GetCell0oCell.GetContent ().GetEplement(0)AddTextoDocument.Push(oTable)!varocopy表1 =otable.copyoCopyTable1.SetWidth("percent", 10)!OCell=OCopy表1.GetRow0GETCell0OCell.ClearoCell.GetContent ().GetEplement(0)AddText ("这是表单单元格,当我们试图修改表宽度时文本被包包")var tableCellPr =otableStyle.GettableCellProTableCellPr.SetNoWrap(false)!oDocument.Push(oCopyTable1)!varocopy表2 =otable.copyoCopyTable2.SetWidth("percent", 10)!OCell=OCopy表2GetRow0GETCell0OCell.ClearoCell.GetContent ().GetEplement(0)AddText ("这是表单单元格,当我们尝试修改表宽度时文本不包oTableCellPr.SetNoWrap(true)!oCopyTable2.SetStyle(oTableStyle)!oDocument.Push(oCopyTable2)!builder.SaveFile("docx", "SetNoWrap.docx")!builder.CloseFile();

结果文档