Get Started
Documentation

Delete

Delete() → { bool }

Deletes current paragraph.

Returns:

Type
bool

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", 60 * 36000, 35 * 36000, oFill, oStroke, 0, 2 * 36000, 0, 3 * 36000);
oDocContent = oShape.GetDocContent();
oDocContent.RemoveAllElements();
oParagraph = Api.CreateParagraph();
oParagraph.AddText("This is just a sample text.");
oDocContent.Push(oParagraph);
oParagraph.Delete();
oWorksheet.GetRange("A1").SetValue("The paragraph from the shape content was removed.");
builder.SaveFile("xlsx", "Delete.xlsx");
builder.CloseFile();

Resulting document