From e081a88e5840e5b6bac0928504dca7d882b78b03 Mon Sep 17 00:00:00 2001 From: Nater Jorde Date: Sat, 25 Nov 2017 13:58:39 -0600 Subject: [PATCH] Fix conditional style fills resolves issue 147: https://github.com/natergj/excel4node/issues/147 --- README.md | 6 +++--- source/lib/style/style.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ba9673e..17fbe06 100644 --- a/README.md +++ b/README.md @@ -570,10 +570,10 @@ Style Options Object: outline: boolean }, fill: { // §18.8.20 fill (Fill) - type: string, // Currently only 'pattern' is implimented. Non-implimented option is 'gradient' + type: string, // Currently only 'pattern' is implemented. Non-implemented option is 'gradient' patternType: string, //§18.18.55 ST_PatternType (Pattern Type) - bgColor: string // HTML style hex value. optional. defaults to black - fgColor: string // HTML style hex value. required. + bgColor: string // HTML style hex value. defaults to black + fgColor: string // HTML style hex value. defaults to black. }, numberFormat: integer or string // §18.8.30 numFmt (Number Format) }); diff --git a/source/lib/style/style.js b/source/lib/style/style.js index 52edf3e..2d40788 100644 --- a/source/lib/style/style.js +++ b/source/lib/style/style.js @@ -320,7 +320,7 @@ class Style { } if (this.fill instanceof Fill) { - this.fill.addToXMLele(thisEle); + this.fill.addToXMLele(thisEle.ele('fill')); } if (this.alignment instanceof Alignment) {