Fonts are completely broken
See original GitHub issueCurrently the first declared font will affect the entire worksheet. It doesn’t seem to matter if you set a column, row, or cell - all of these will affect the whole document with seemingly no way to override it once it’s been set.
It also seems like subsequently declared fonts affect future cells. Are fonts meant to be some sort of stateful thing? It seems like they should be reset unless they have been explicitly declared.
Here’s a simple script to reproduce this issue:
const Excel = require('exceljs');
const wb = new Excel.Workbook();
const ws = wb.addWorksheet('My Sheet');
ws.columns = [
{header: 'First', key: 'first', width: 10},
{header: 'Second', key: 'second', width: 10},
];
const a2 = ws.getCell('A2');
const b2 = ws.getCell('B2');
a2.value = 'a2 test';
b2.value = 'b2 test';
a2.font = {
name: 'Comic Sans MS',
family: 4,
size: 16,
underline: true,
bold: true
};
b2.font = {
name: 'Arial Black',
color: {argb: 'FF00FF00'},
family: 2,
size: 14,
italic: true
};
wb.xlsx.writeFile(__dirname + '/test.xlsx');
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Fonts broken : r/firefox - Reddit
I run Firefox in Windows 7 32 bits. I remember Firefox working perfectly like a year or two ago. Any idea what could...
Read more >80 Free Broken Fonts - 1001 Fonts
We have 80 free Broken Fonts to offer for direct downloading · 1001 Fonts is your favorite site for free fonts since 2001....
Read more >Troubleshoot font issues - Adobe Support
Get the latest app · 4 Ways to remove damaged fonts · Remove third-party font management plug-in · Clear the system font cache...
Read more >Broken Fonts - FontSpace
Looking for Broken fonts? ✓ Click to find the best 124 free fonts in the Broken style. Every font is free to download!...
Read more >Font broken in many sites/across many browsers - Super User
This is a widespread problem, especially with Helvetica Neue fonts. Here's what worked for me to fix Helvetica Neue and Helvetica Neue Bold ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@trappar
+ 1
We can down version to resolve this issue, the exact version is"exceljs": "1.12.0"
I try it and it’s work pretty perfectlysupposedly fixed today 1.14.0 found it 15 minutes after it was published.