JSON API - setCellValue
setCellValue
PREMIUM
TRIAL / ADVANCED
Sets a cell value keeping existing styles.
Note
You are reading the JSON API documentation. For the PHP API method please go to setCellValue.
This method allows adding cell values setting a position.
The same can be done using addCell, that allows using more options.
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. |
| italic | If true displays the content in italics. |
| strikethrough | If true displays text in strikethrough. |
| subscript | If true displays text in subscript. |
| superscript | If true displays text in superscript. |
| underline | Underlines text: "single", "double". |
| position | Cell position in the active sheet: "A1", "C3", "AB7"... |
Code samples
Example #1
A template can be a local file, a Base64 string, or a remote file.
Release notes
- phpxlsx 6.0:
- new action.