Open hydenz opened 3 years ago
I got the same problem, and set cell.font also aplied to entire column
It appears that the style object of a cell can be shared among multiple cells or ranges, so changing the fill of one cell affects all of the cells that reference the same style object. If you want to force color a specific cell, a work around is to just create a new style object and assign it to the cell's style property.
try this
ws.getCell('A2').style = {
...ws.getCell('A2').style,
fill: {
type: 'pattern',
pattern: 'solid',
fgColor: { argb: 'FFFFFF00' },
}
}
🐛 Bug Report
When I try to set a specific cell fill using
worksheet.getCell('A2')
, the fill is applied to all cells in A column. Lib version: 4.2.1Steps To Reproduce
The expected behaviour:
A2 cell color is changed to argb FFFFFF00 (yellow)
Actual behaviour:
All 'A' column cell colors are changed to argb FFFFFF00 (yellow)