SetCellSpacing
function SetCellSpacing(nValue: any = null): void
Description
Specifies the default table cell spacing (the spacing between adjacent cells and the edges of the table).
Parameters
- nValue
any
null Spacing value measured in twentieths of a point (1/1440 of an inch).
"Null"
means that no spacing will be applied.
Returns
void
Try It
var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("We create a 3x3 table and set the cell spacing to half an inch:");
var oTableStyle = oDocument.CreateStyle("CustomTableStyle", "table");
oTableStyle.SetBasedOn(oDocument.GetStyle("Bordered"));
var oTablePr = oTableStyle.GetTablePr();
var oTable = Api.CreateTable(3, 3);
oTable.SetStyle(oTableStyle);
oTablePr.SetCellSpacing(720);
oDocument.Push(oTable);