JSON API - createCellStyle

createCellStyle

PREMIUM TRIAL / ADVANCED

Creates a cell style.

Note

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

JSON data
Key Description
name Style name. Preset style names: Bad, Calculation, Check Cell, Comma, Currency, Explanatory Text, Good, Heading 1, Heading 2, Heading 3, Heading 4, Input, Linked Cell, Neutral, Normal, Note, Output, Percent, Warning Text.
backgroundColor Hexadecimal color value: "FFFF00", "CCCCCC"...
bold If true the content will be shown in bold characters.
border Border type: thin, thick, dashed, double, mediumDashDotDot, hair... This value can be overridden for each side with "borderTop", "borderRight", "borderBottom", "borderLeft" and "borderDiagonal" properties.
borderColor Hexadecimal color value: "FFFF00", "CCCCCC"... This value can be overridden for each side with "borderColorTop", "borderColorRight", "borderColorBottom", "borderColorLeft" and "borderColorDiagonal" properties.
color Hexadecimal color value: "FF0000", "000000"...
font Font family: "Arial", "Calibri"...
fontSize Font size in points.
horizontalAlign left, center, right.
indent Indent value.
italic If true displays the content in italics.
locked Locked property.
rotation 60.000ths of a degree.
shrinkToFit If true enables shrink to fit.
strikethrough If true displays text in strikethrough.
subscript If true displays text in subscript.
superscript If true displays text in superscript.
textDirection context, ltr, rtl.
typeOptions Keys and values:
  • formatCode
underline Underlines text: single, double.
verticalAlign top, center, bottom.
wrapText If true enables wrap text.
hidden Hidden attribute. Default as false.
Code samples

Example #1

Release notes
  • phpxlsx 6.0:
    • new action.