JSON API - addSheet
addSheet
PREMIUM
TRIAL / ADVANCED
Inserts a new sheet into the Excel spreadsheet.
Note
You are reading the JSON API documentation. For the PHP API method please go to addSheet.
JSON data
| Key | Description |
|---|---|
| active | If true set as active sheet. Default as false. |
| color | HEX value. |
| defaultColWidth | Default column width. |
| defaultRowHeight | Default row height. |
| name | Custom sheet name. Must be unique in the spreadsheet and it can't contain ':' '\' '/' '?' '*' '[' ']'. If this option is not set a default new name is generated automatically. |
| pageMargins | Keys and values:
|
| position | Sheet position. As default use the last position. 0 is the first sheet. |
| removeSelected | If true remove selected property in all sheets. Default as false. |
| rtl | Set to true for right to left. |
| selected | If true set the new sheet as selected. Default as false. |
| state | hidden. |
Code samples
Example #1
Example #2
A template can be a local file, a Base64 string, or a remote file.
Example #3
Release notes
- phpxlsx 6.0:
- new action.