Tables allow inserting, grouping and managing a range of cells.
Additional options can be used to apply styles, customize column names, include functions and add filters.
The method for adding new tables in the active sheet is addTable:
This method includes the following parameters:
- $contents: a multidimensional array with the contents and styles to be added
- $position: cell position in the active sheet (A1, C3, AB7...)
- $tableStyles: table styles
- $options: column names, table name, totals, filters...
A very simple table can be created running:
Complex tables can be done, adding multiple columns, styles and total functions: