question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cell font styling is applied to entire sheet

See original GitHub issue

I tried to apply font style to a single cell but the style gets applied to the entire worksheet. eg

worksheet.getCell('A1').font = { color: { argb: '3a80d5' }}

Expected result: Cell A1 font color should be #3a80d5

Actual result: All cells in the worksheet have font color #3a80d5

Also I tried to apply this to a column as follows:

worksheet.getColumn('columnId').eachCell((cell, rowNumber) => { 
     cell.font = { color: { argb: '3a80d5' }}
})

I expect that all cells in column columnId should have the new font color and all other cells remain with the default black font color. But instead. all cells in the worksheet are styled to have the color #3a80d5.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:27
  • Comments:21 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
vlad-ivanov-dcommented, Jul 31, 2019

It looks like the issue is fixed in version 1.14.0

4reactions
GunnerUjjwolcommented, Jul 17, 2019

this has been bugging me for a while now, I had been scratching my head over what I did wrong with my code, turns out it is a problem everybody has been facing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change the font style and size for a worksheet
Select the cell or cell range that has the text or number you want to format. Click the arrow next to Font and...
Read more >
Change Cell Font Style with Apache POI - Baeldung
In this article, we'll discuss how to change cells' style in Microsoft Excel when using a class called CellStyle. That is to say,...
Read more >
Google Sheets: Formatting Cells - GCF Global
Locate and select the Font Size button in the toolbar, then choose the desired font size from the drop-down menu. In our example,...
Read more >
VBA Cell Font - Change Color, Size, Style, & More
In VBA, you can change font properties using the VBA Font Property of the Range Object. Type the following code into the VBA...
Read more >
How to Change Font in the Whole Excel Workbook
Method 1: Select all worksheets and set the font ... This is one of the fastest method: Change the style in all cells...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found