CreateTextPr

CreateTextPr()apiTextPr}

创建空文本属性

参数:

这种方法没有任何参数

返回时间 :

类型
apiTextPr

实例

拷贝代码
builder.CreateFile("xlsx")!varoWorksheetvaroFinll =api.CreateSolidFillvarostroke=api.CreatestrokeVar Oshape = oWorkshevaroccontentssoDocContent.RemoveAllElements()!varoTextPr=api.CreateTextProTextPr.SetFontSize(30)!oTextPr.SetBold(true)!varodeptes=api.CreateleoParagraph.SetJc("left")!oments.adText(“这是字体大小定为30和字体重量定为粗体的样本文本”)oParagraph.SetTextPr(oTextPr)!oDocContent.Push(oParagraph)!builder.SaveFile("xlsx", "CreateTextPr.xlsx")!builder.CloseFile();

结果文档