Unable to fill background color
See original GitHub issueWhy does this code have no effect?It can not fill the background color?Who can help me?
` json.map((v, i) => { if(maxLen<Object.keys(v).length){ maxLen=Object.keys(v).length; } return Object.keys(v).map((k, j) => { //取出键对应的值
return Object.assign({}, { //拼接输出的sheet
v: v[k],
position: (j > 25 ? this.getCharCol(j) : String.fromCharCode(65 + j)) + (i + 1),
})}
)
}).reduce((prev, next) => prev.concat(next)).forEach(function (v) {
var cell={ //转换输出json
v: v.v,
s:{
fill : {
fgColor : {
theme : 8,
tint : 0.3999755851924192,
rgb : '08CB26'
}
},
font : {
color : {
rgb : "FFFFFF"
},
bold : true
},
border : {
bottom : {
style : "thin",
color : {
theme : 5,
tint : "-0.3",
rgb: "E8E5E4"
}
}
}
}
}
if ( typeof cell.v === 'number')
cell.t = 'n';
else if ( typeof cell.v === 'boolean')
cell.t = 'b';
else if (cell.v instanceof Date) {
cell.t = 'n';
cell.z = XLSX.SSF._table[14];
cell.v = datenum(cell.v);
} else
cell.t = 's';
tmpdata[v.position] = cell;
})
`
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
Unable to set background color with Absolute and Fixed ...
I'm unable to set background color when i use position to my signin div and bottom div.I tried to remove position but it...
Read more >Can't change background color - Microsoft Community
Hello,. Strange question... I can't change the background color for certain paragraphs. I've uploaded the document to Word online:.
Read more >Add a background color to text in Pages for iCloud
If the color is behind the text only (not into the margins): Click the Style button near the top, click the Action pop-up...
Read more >Can't change background color in Acrobat Pro DC
Are you trying to change the background colour for yourself, ... What makes it a template specifically (rather than just a cover for...
Read more >How to Fix When Fill Color Doesn't Display Properly in Excel
First, make sure that the cells you're trying to fill are actually selected. If they're not, the fill color won't show up. Next,...
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
We offer this in the Pro compendium. Since companies have paid for the features already, it would be unfair to them if we turned around and made it available as open source. We have a longer comment in a gist.
Sorry my bad im using this fork https://github.com/xSirrioNx/js-xlsx i think is better the should merge to master