Get Started
Documentation

Copy

Copy() → { ApiRun }

Create a copy of the run.

Returns:

Type
ApiRun

Example

Copy code
builder.CreateFile("xlsx");
oWorksheet = Api.GetActiveSheet();
oFill = Api.CreateSolidFill(Api.CreateRGBColor(104, 155, 104));
oStroke = Api.CreateStroke(0, Api.CreateNoFill());
oShape = oWorksheet.AddShape("flowChartOnlineStorage", 120 * 36000, 70 * 36000, oFill, oStroke, 0, 2 * 36000, 0, 3 * 36000);
oDocContent = oShape.GetDocContent();
oParagraph = oDocContent.GetElement(0);
oRun = Api.CreateRun();
oRun.AddText("This is just a sample text that was copied. ");
oParagraph.AddElement(oRun);
oCopyRun = oRun.Copy();
oParagraph.AddElement(oCopyRun);
builder.SaveFile("xlsx", "Copy.xlsx");
builder.CloseFile();

Resulting document