Adds a Text Art object to the current sheet with the parameters specified.
Name | Type | Default | Description |
oTextPr | ApiTextPr | Api.CreateTextPr() | The text properties. |
sText | string | "Your text here" | The text for the Text Art object. |
sTransform | TextTransform | "textNoShape" | Text transform type. |
oFill | ApiFill | Api.CreateNoFill() | The color or pattern used to fill the Text Art object. |
oStroke | ApiStroke | Api.CreateStroke(0, Api.CreateNoFill()) | The stroke used to create the Text Art object shadow. |
nRotAngle | number | 0 | Rotation angle. |
nWidth | EMU | 1828800 | The Text Art width measured in English measure units. |
nHeight | EMU | 1828800 | The Text Art heigth measured in English measure units. |
nFromCol | number | 0 | The column number where the beginning of the Text Art object will be placed. |
nFromRow | number | 0 | The row number where the beginning of the Text Art object will be placed. |
nColOffset | EMU | 0 | The offset from the nFromCol column to the left part of the Text Art object measured in English measure units. |
nRowOffset | EMU | 0 | The offset from the nFromRow row to the upper part of the Text Art object measured in English measure units. |
builder.CreateFile("xlsx"); var oWorksheet = Api.GetActiveSheet(); var oTextPr = Api.CreateTextPr(); oTextPr.SetFontSize(72); oTextPr.SetBold(true); oTextPr.SetCaps(true); oTextPr.SetColor(51, 51, 51, false); oTextPr.SetFontFamily("Comic Sans MS"); var oFill = Api.CreateSolidFill(Api.CreateRGBColor(255, 111, 61)); var oStroke = Api.CreateStroke(1 * 36000, Api.CreateSolidFill(Api.CreateRGBColor(51, 51, 51))); oWorksheet.AddWordArt(oTextPr, "onlyoffice", "textArchUp", oFill, oStroke, 0, 100 * 36000, 20 * 36000, 0, 2, 2 * 36000, 3 * 36000); builder.SaveFile("xlsx", "AddWordArt.xlsx"); builder.CloseFile();