# Auto Expand Tables

## Content

SpreadJS supports the automatic expansion of tables. A table will expand automatically if data is entered or pasted in the empty adjacent row or column of the table.

The [allowAutoExpand](/spreadjs/api/v16/classes/GC.Spread.Sheets.Tables.Table#allowAutoExpand) method can be used to enable or disable the automatic expansion of tables. Its default value is true.

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

The following code sample adds a table and displays the value of the **allowAutoExpand** method.

```javascript
// Add Table
var table = activeSheet.tables.add("ExpandTable", 1, 1, 4, 3, GC.Spread.Sheets.Tables.TableThemes.dark1);
// allowAutoExpand is true by default, but we can set it to false as well for disabling auto expansion of tables
alert(table.allowAutoExpand());
```