# Create Tables

## Content

You can display data in a table in the control. The table has options to filter or sort the data.

![](https://gcdocumentsitekrblob.blob.core.windows.net/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/images/table.png)

The default table style is `medium2`.

SpreadJS provides the following methods for different kinds of customizations:

* Control whether to display the table header and footer by setting the [showHeader](/spreadjs/api/v16/classes/GC.Spread.Sheets.Tables.Table#showHeader) and [showFooter](/spreadjs/api/v16/classes/GC.Spread.Sheets.Tables.Table#showFooter) methods.
* Control whether to highlight the first or last column by setting the [highlightFirstColumn](/spreadjs/api/v16/classes/GC.Spread.Sheets.Tables.Table#highlightFirstColumn) or [highlightLastColumn](/spreadjs/api/v16/classes/GC.Spread.Sheets.Tables.Table#highlightLastColumn) method.
* Control whether to show banded rows and columns by setting the [bandRows](/spreadjs/api/v16/classes/GC.Spread.Sheets.Tables.Table#bandRows) or [bandColumns](/spreadjs/api/v16/classes/GC.Spread.Sheets.Tables.Table#bandColumns) method.
* Customize the table style with the [TableStyle](/spreadjs/api/v16/classes/GC.Spread.Sheets.Tables.TableStyle) class, [headerRowStyle](/spreadjs/api/v16/classes/GC.Spread.Sheets.Tables.TableTheme#headerRowStyle) method, and the [footerRowStyle](/spreadjs/api/v16/classes/GC.Spread.Sheets.Tables.TableTheme#footerRowStyle) method.
* Set the header cell text and the footer cell text and formula.

The row count for the table includes the header and footer rows. Tables support frozen rows and columns, sparklines, and cell spans.

The following code sample creates a table and sets the table style.

```javascript
activeSheet.tables.add("Table1", 0, 0, 3, 3, GC.Spread.Sheets.Tables.TableThemes.dark1);
activeSheet.getCell(0,0).text("Name");
activeSheet.getCell(0,1).text("Value");
activeSheet.getCell(0,2).text("T/F");
activeSheet.getCell(1,0).text("AW");
activeSheet.getCell(1,1).text("5");
activeSheet.getCell(1,2).text("T");
```