dtjohnson / xlsx-populate

Excel XLSX parser/generator written in JavaScript with Node.js and browser support, jQuery/d3-style method chaining, encryption, and a focus on keeping existing workbook features and styles in tact.
MIT License
956 stars 183 forks source link

Font color is reverting to default(black) on double clicking the cell #358

Closed zainalihashmi closed 11 months ago

zainalihashmi commented 1 year ago

I have generated the sheet and added the header row with fill and fontColor properties, the excel sheet was generated as expected but when I double click on the header cell, the font color for the cell reverts back to the default font color(black). I have the following code to apply the design on cell range:

export const blueBackgroundWithWhiteTextStyle = { bold: true, rightBorderStyle: 'medium', bottomBorderStyle: 'medium', borderColor: 'FFFFFF', fill: '2151FF', fontColor: 'FFFFFF' };

sheet.range('B9:K9').style(blueBackgroundWithWhiteTextStyle);