JSON API - createTableStyle

createTableStyle

PREMIUM TRIAL / ADVANCED

Creates a table style.

Note

You are reading the JSON API documentation. For the PHP API method please go to createTableStyle.

JSON data
Key Description
name The name of the table style.
border Border type: none, single, double, dashed, threeDEngrave, threeDEmboss, outset, inset... This value can be overridden for each side with the use 'borderTop', 'borderRight', 'borderBottom' and 'borderLeft' properties.
borderColor Hexadecimal color value: 'FF0000', '000000'... This value can be overridden for each side with the use of 'borderTopColor', 'borderRightColor', 'borderBottomColor' and 'borderLeftColor' properties.
borderSpacing Border spacing in points. This value can be overridden for each side with the use of 'borderTopSpacing', 'borderRightSpacing', 'borderBottomSpacing' and 'borderLeftSpacing' properties.
borderWidth Border size in eigths of a point. This value can be overridden for each side with the use of 'borderTopWidth', 'borderRightWidth', 'borderBottomWidth' and 'borderLeftWidth' properties.
cantSplit If true the rows can not split across pages.
cellBackgroundColor Hexadecimal color value: 'FF0000', '000000'...
cellMargin An integer or an object with keys: top, right, bottom and left. The values are given in twentieths of a point.
indent Table indentation. The value is given in twentieths of a point.
rPrStyles Character styles to be applied.
pPrStyles Paragraph styles to be applied.
tableStyle Id of the style this table style is based on (it may be retrieved with the parseStyles method).
tblStyleColBandSize Column banded style.
tblStyleRowBandSize Row banded style.
band1HorzStyle Set odd rows styles using border, borderColor, borderSpacing, borderWidth, backgroundColor, vAlign, rPrStyles, pPrStyles properties.
band1VertStyle Sets odd cols styles using border, borderColor, borderSpacing, borderWidth, backgroundColor, vAlign, rPrStyles, pPrStyles properties.
band2HorzStyle Sets even rows styles using border, borderColor, borderSpacing, borderWidth, backgroundColor, vAlign, rPrStyles, pPrStyles properties.
band2VertStyle Sets even cols styles using border, borderColor, borderSpacing, borderWidth, backgroundColor, vAlign, rPrStyles, pPrStyles properties.
firstColStyle Sets first column styles using border, borderColor, borderSpacing, borderWidth, backgroundColor, vAlign, rPrStyles, pPrStyles properties.
firstRowStyle Sets first row styles using border, borderColor, borderSpacing, borderWidth, backgroundColor, vAlign, rPrStyles, pPrStyles properties.
hidden Hide style from user interface.
lastColStyle Sets last col styles using border, borderColor, borderSpacing, borderWidth, backgroundColor, vAlign, rPrStyles, pPrStyles properties.
lastRowStyle Sets last row styles using border, borderColor, borderSpacing, borderWidth, backgroundColor, vAlign, rPrStyles, pPrStyles properties.
locked Style cannot be applied.
next Style for next paragraph.
neCellStyle Sets top right styles using border, borderColor, borderSpacing, borderWidth, backgroundColor, vAlign, rPrStyles, pPrStyles properties.
nwCellStyle Sets top left styles using border, borderColor, borderSpacing, borderWidth, backgroundColor, vAlign, rPrStyles, pPrStyles properties.
seCellStyle Sets bottom right styles using border, borderColor, borderSpacing, borderWidth, backgroundColor, vAlign, rPrStyles, pPrStyles properties.
semiHidden Hide style from main user interface.
swCellStyle Sets bottom left styles using border, borderColor, borderSpacing, borderWidth, backgroundColor, vAlign, rPrStyles, pPrStyles properties.
unhideWhenUsed Remove semi-hidden property when style is used.
Code samples

Example #1

Release notes
  • phpdocx 18.0:
    • new action.