GetPrevious
function GetPrevious(): ApiTableCell | "null"
Description
Returns the previous cell if exists.
Returns
ApiTableCell | "null"
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("Cell 1");
oTable.GetCell(0, 1).GetContent().GetElement(0).AddText("Cell 2");
oDocument.Push(oTable);
var oPreviousCell = oTable.GetCell(0, 1).GetPrevious();
oPreviousCell.GetContent().GetElement(0).SetBold(true);