Closed Rajnish710 closed 2 months ago
If the cell is visible, you can do:
instance.records[y][x].element.classList.add('yourClass');
Via event:
jspreadsheet(document.getElementById('spreadsheet'), {
worksheets: [{ minDimensions: [6,6]}],
oncreatecell: function(worksheet, cell, x, y, value) {
if (x === 0 && y === 0) {
cell.classList.add('yourClass');
}
}
});
Via validations: You can use format type.
{
range: 'Sheet1!B1:B3',
action: "format",
criteria: "<",
type: "number",
value: [500],
format: { color: '#ff0000' },
className: 'yourClass' // add this class if the condition is match
}
``
Can I assign a custom class to a specific cell like we use setStyle?