Get Started
Usage API
More information

Clear

Clear() → { bool }

Clears the content from the current row.

Parameters:

This method doesn't have any parameters.

Returns:

Type
bool

Example

Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oTable = Api.CreateTable(3, 3);
var oRow = oTable.GetRow(0);
oRow.GetCell(0).GetContent().GetElement(0).AddText("First row");
oRow.Clear();
oRow = oTable.GetRow(1);
oRow.GetCell(0).GetContent().GetElement(0).AddText("The first row content was cleared.");
oDocument.Push(oTable);
builder.SaveFile("docx", "Clear.docx");
builder.CloseFile();

Resulting document