Clear
function Clear(): boolean
Description
Clears the content from the current cell.
Returns
boolean
Try It
var oDocument = Api.GetDocument();
var oTableStyle = oDocument.CreateStyle("CustomTableStyle", "table");
oTableStyle.SetBasedOn(oDocument.GetStyle("Bordered"));
var oTable = Api.CreateTable(3, 3);
oTable.SetWidth("percent", 100);
oTable.SetStyle(oTableStyle);
oTable.GetCell(0, 0).GetContent().GetElement(0).AddText("This is just a sample text.");
oDocument.Push(oTable);
oTable.GetCell(0, 0).Clear();
var oParagraph = Api.CreateParagraph();
oParagraph.AddText("The content of the table cell was cleared.");
oDocument.Push(oParagraph);