exceljs / exceljs/exceljs

[BUG] font parameter is being overwritten if used in the same row for different cells

Open
#2,935 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
15.5k
Forks
2k
PR merge metrics
No merged PRs in 30d

Description

## 🐛 Bug Report

While using exceljs to change the font of diferent cells in the same row, the font is overwritten in both cells to the latest value, and it makes impossible to set font to diferente fields
Lib version: 4.4.0

## Steps To Reproduce

```javascript
for(let i = 17; i < worksheetQuotation._rows.length+1; i++) {
var row = worksheetQuotation.getRow(i);

if(row .getCell(10).value == "TOTAL"){
break;
}

row.getCell(8).font = { name: 'Arial', size: 12, bold: false };
row.getCell(9).font = { name: 'Arial', size: 14, bold: true };
row.commit();
}
If you executed a for like this, the font argument of cell 8 gets the same value as the font argument of cell 9
and the xlsx shows fields in column 9 without bold and fields in column 8 with bold

```

## The expected behaviour:

## Possible solution (optional, but very helpful):

```javascript

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.