chuanyi / msexcel-builder

A simple and fast library to create MS Office Excel(>2007) xlsx files.
MIT License
184 stars 130 forks source link

Cell color is not working. In place of color it fills by pattern. #5

Open bhaveshletter opened 11 years ago

bhaveshletter commented 11 years ago

I tried as below to fill color into cell

sheet1.fill(3, 3, {type:'solid',fgColor:'8',bgColor:'64'});

In place of color it fills by pattern.

pacmac commented 11 years ago

Hi, I am having the same problem, seems that the fill is not working, the bgColor & fgColor colors are ignored and the background has a black and white fill pattern which is always the same.

ghost commented 10 years ago

Hi, I am having the same problem regarding the bgColor and fgColor. All it is coming out as a black dots.

yoshiya0503 commented 10 years ago

Hi, I am also having the same problem. :(

alexnaspo commented 10 years ago

+1

adrianblynch commented 10 years ago

I'm seeing the same issue.

@chuanyi - I know you're likely to say issue a PR, but do you have any comment on this?

Cheers.

adrianblynch commented 10 years ago

Sorry, just spotted this:

https://github.com/aloteot/msexcel-builder/commit/08bac71924eaa3b4aec84c26f8df3d32073d85da

Is this likely to be merged?

matthiasforgit commented 9 years ago

Same problem here.. is there a solution?

adrianblynch commented 9 years ago

I ended up using the forked and fixed one here: https://github.com/aloteot/msexcel-builder

Let us know what you end up doing.

matthiasforgit commented 9 years ago

Thank you so much, that works flawlessly! You just made my day!

There's no way to set the font color, right?

adrianblynch commented 9 years ago

I can't remember. I have some code somewhere, will hunt it down to see.

jasmith79 commented 9 years ago

Ended up using forked version. @matthiasforgit or anyone else who stumbles across this: although its not in the API docs if you look at the code font color can be changed. example:

sheet.font(col, row, {color: 'FFFFFFFF'});

changes font for that cell to white.

fauria commented 9 years ago

Same issue here. This is how the sample code looks like:

captura de pantalla 2015-03-05 a la s 12 00 02

joaobrunoah commented 9 years ago

Color problems were fixed in this npm package:

npm install msexcel-builder-extended

In order to make it work, use:

sheet.font(col, row, {color: 'FFFFFF'}); // Text color, in HEX
sheet.fill(col,row,{type:'solid',fgColor:'000000'}) // Background color (Yes, background color), in HEX

It worked for me.

CedricVidrequin commented 9 years ago

Thank you for the extended version. It works like a charm :-)