SpreadJS Documentation
Using the gc-column Element
SpreadJS Documentation > Developer's Guide > Working with JavaScript Frameworks > Using SpreadJS with Vue > Using the gc-column Element

The following table lists the attributes of the gc-column element.

Attribute API Reference Type Comment
dataField columnInfo.name string Set for Worksheet.bindColumn(index, columnInfo) function
headerText columnInfo.displayName string Set for Worksheet.bindColumn(index, columnInfo) function
width CellRange.width(value) number  
visible CellRange.visible(value) boolean  
resizable CellRange.resizable(value) boolean  
autoFit Worksheet.autoFitColumn(column) boolean If set autoFit to true, the column will do auto-fit automatically after data binding
columnStyle Worksheet.setStyle(-1, index, value) GC.Spread.Sheets.Style Set the column’s style
headerStyle Worksheet.setStyle(-1, index, value, GC.Spread.Sheet.GC.Spread.Sheets.SheetArea.colHeader) GC.Spread.Sheets.Style

 

Set the style of column header

cellType Worksheet.setCellType(-1, index, value) GC.Spread.Sheets.CellTypes.Base  
formatter Worksheet.setFormatter(-1, index, value) string