设屏

SetWidth-stype-snvalue

继承发件人 :ApiTableCellPr#SetWidth

设置当前表单首选宽度

参数:

名称 类型 默认 描述性
sType系统 表格Width

类型宽值从可用宽值类型

svalue语言 数组 空号

表格宽度值以正整数测量

返回时间 :

方法不返回数据

实例

拷贝代码
builder.CreateFile("docx")!varoDocuments=api.GetDocumentvar表Style=ODocument.CreateStyleoTableStyle.SetBasedOn(oDocument.GetStyle("Bordered"))!varo表=api.Criate表(3,3)oTable.SetWidth("percent", 100)!varocell =otable.GetRow0.GetCell0OCell.SETWidthvarodents=oCell.GetContentsoParagraph.AddText("2 inches")!OCell =OTACLOOGETROOGGETELLEOCell.SETWidth(twips,1440)oParagraph = oCell.GetContent().GetElement(0)!adText ("1英吋")OCell =OTable.GetRow(0)GetCell(2)OCell.SETWidthoParagraph = oCell.GetContent().GetElement(0)!oParagraph.AddText("3 inches")!oTable.SetStyle(oTableStyle)!oDocument.Push(oTable)!builder.SaveFile("docx", "SetWidth.docx")!builder.CloseFile();

结果文档