SetTextPr

SetTextPr(oTextPr)apiTextPr}

设置文本属性当前运行

参数:

名称 类型 描述性
extPr apiTextPr

文本属性设置为当前运行

返回时间 :

类型
apiTextPr

实例

拷贝代码
builder.CreateFile("xlsx")!varoWorksheetvaroFinll =api.CreateSolidFillvarostroke=api.CreatestrokeVar Oshape = oWorksheet.varoccontentssvarodente=occontent.getEplement0var ORun=api.CreateRunORun.AddText ("这是样本文本 字体大小设置为15分 字体重量设置为粗体")varoTextPrssun.getTextProTextPr.SetFontSize(30)!oTextPr.SetBold(true)!oRun.SetTextPr(oTextPr)!oParagraph.AddElement(oRun)!builder.SaveFile("xlsx", "SetTextPr.xlsx")!builder.CloseFile();

结果文档