How to set the proper Solid fill? #1658
-
When using solid fill, the cell seems to become black entirely. It might be the case because I am using LibreOffice. Google Spreadsheets does not color the cell at all. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 4 replies
-
I recently had cause to use a solid fill myself, and no problem on it (sets an off-red background) - cell.fill = {
type: "pattern",
pattern: "solid",
fgColor: {
argb: "FFFF7D7D"
},
bgColor: {
argb: "FF000000"
}
} Could you have done it slightly differently? (As a side note, Excel can really mess up with fills on empty cells at the end of rows - it's ugly). |
Beta Was this translation helpful? Give feedback.
-
@StephanMeijer I've just published 0.4.2, which I'm hoping will resolve this issue. I've fixed an issue with handling themes which can cause the effects you're seeing. |
Beta Was this translation helpful? Give feedback.
-
@guyonroche I have the same issue even after updating to 0.4.2 also I am using Excel 2016 to read the output xlsx |
Beta Was this translation helpful? Give feedback.
-
@StephanMeijer @guyonroche I found that after setting both fgColor and bgColor to the same value I get my intended fill color with black text.
Will yield a yellow background with black text of "Test Text" |
Beta Was this translation helpful? Give feedback.
-
fgColor is the color of your filling. you only need to specify fgColor if you're using this is how you fill with red color:
|
Beta Was this translation helpful? Give feedback.
-
I think this issue is legit as I stumbled on the proper usage of cell filling today again. I opened a PR to clarify the doc about it. |
Beta Was this translation helpful? Give feedback.
fgColor is the color of your filling. you only need to specify fgColor if you're using
solid
this is how you fill with red color: