CellModel
23 Sep 20252 minutes to read
Interface for a class Cell
Properties
chart ChartModel[]
Specifies the chart of the cell.
colSpan number
Specifies the column-wise cell merge count.
format string
Specifies the number format code to display value in specified number format.
formula string
Defines the formula or expression of the cell.
hyperlink string|HyperlinkModel
Specifies the hyperlink of the cell.
image ImageModel[]
Specifies the image of the cell.
index number
Specifies the index of the cell.
isLocked boolean
Specifies the cell is locked or not, for allow edit range in spreadsheet protect option.
isReadOnly boolean
Represents whether a cell in the sheet is read-only or not. If set to true, it prevents editing the specified cell in the sheet.
notes string
Specifies the note of the cell.
rowSpan number
Specifies the row-wise cell merge count.
style CellStyleModel
Specifies the cell style options.
<div id='Spreadsheet'></div>let spreadsheet: Spreadsheet = new Spreadsheet({
sheets: [{
...
rows: [{
cells: [{ value: '12', index: 2, style: { fontWeight: 'bold', fontSize: 12, fontStyle: 'italic', textIndent: '2pt'
backgroundColor: '#4b5366', color: '#ffffff' } }]
}]
}]
});
spreadsheet.appendTo('#Spreadsheet');validation ValidationModel
Specifies the validation of the cell.
value string
Defines the value of the cell which can be text or number.
wrap boolean
Wraps the cell text to the next line, if the text width exceeds the column width.