JSON API - addTextBox

addTextBox

PREMIUM TRIAL / ADVANCED

Inserts a text box into the Excel spreadsheet.

Note

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

JSON data
Key Description
text The content to be inserted.
bold If true the content will be shown in bold characters.
color Hexadecimal color value: "FF0000", "000000"...
font Font family: "Arial", "Calibri"...
fontSize Font size in points.
highlight Hexadecimal color value: "FF0000", "000000"...
italic If true displays the content in italics.
strikethrough If true displays text in strikethrough.
transparency 0 to 100.
underline Underlines text: "single", "double".
position Cell position in the active sheet: "A1", "C3", "AB7"...
align left, center, right.
backgroundColor Hexadecimal color value: "FF0000", "000000"...
backgroundTransparency 0 to 100.
border
  • "color" FFFFFF, FF0000...
  • "dashType" solid, roundDot, squareDot, dash...
  • "transparency" 0 to 100.
  • "width" EMUs.
rotation 60.000ths of a degree.
verticalAlign top, middle, bottom.
colOffset
  • "from" column size offset from.
  • "to" column size offset to.
colSize Number of columns used by the text box.
editAs Possible values are:
  • "oneCell" (default): move but don't size with cells.
  • "twoCell": move and size with cells.
  • "absolute": don't move or size with cells.
name Sets a name value.
rowOffset
  • "from" row size offset from.
  • "to" row size offset to.
rowSize Number of rows used by the text box.
Code samples

Example #1

Release notes
  • phpxlsx 6.0:
    • new action.