[]
        
(Showing Draft Content)

Apply Cell Expansion

If a cell has a spill direction other than "None," the Static cells will expand in the same row. You can use the autoExpand property to control whether the cell can be expanded or not.

This autoExpand setting is applicable to the Static, List, Group, and Summary cells. You must configure the autoExpand property in the setTemplateCell method to configure the expansion in the TemplateSheet.

The autoExpand setting has different values, such as:

  • Horizontal: Here, the cell only expands the column count and keeps the same row count as the template cell.

  • Vertical: Here, the cell only expands the row count and keeps the same column count as the template cell.

  • None: Here, the cell keeps the same row and column count as the template cell.

  • Both: Here, the cell expands both row and column counts. This is the default value.

The following code samples show how to set different cell autoExpand settings.

// Set the cell autoExpand as Horizontal.
templateSheet.setTemplateCell(0, 0, {
    autoExpand: 'Horizontal',
});

// Set the cell autoExpand as Vertical.
templateSheet.setTemplateCell(0, 0, {
    autoExpand: 'Vertical',

});
// Set the cell autoExpand as None.
templateSheet.setTemplateCell(0, 0, {
    autoExpand: 'None',
});

// Set the cell autoExpand as Both.
templateSheet.setTemplateCell(0, 0, {
    autoExpand: 'Both',
});