Specifies the default table cell spacing (the spacing between adjacent cells and the edges of the table).
Name | Type | Description |
nValue | twips | Spacing value measured in twentieths of a point (1/1440 of an inch). |
builder.CreateFile("docx"); 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); builder.SaveFile("docx", "SetCellSpacing.docx"); builder.CloseFile();