集封

设置Fill(oapiFill)apiTextPr}

设置文本颜色当前文本运行

参数:

名称 类型 描述性
OAPIFILLLL apiFill

颜色或模式填充文本颜色

返回时间 :

类型
apiTextPr

实例

拷贝代码
builder.CreateFile("xlsx")!varoWorksheetvaroFinll =api.CreateSolidFillvarostroke=api.CreatestrokeVar Oshape = oWorksheet.varoccontentssvarodente=occontent.getEplement0var ORun=api.CreateRunORun.AddText ("这只是样本文本)oParagraph.AddElement(oRun)!ORun=Api.CreateRuni.CreteRGBColor(128,128,128)oRun.SetFill(oFill)!ORun.AddText ("这是用字体颜色设置灰色运行的文本.")oParagraph.AddElement(oRun)!builder.SaveFile("xlsx", "SetFill.xlsx")!builder.CloseFile();

结果文档