Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Commit

Permalink
fix issue with multiple data validations as described in #94 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
natergj committed Nov 12, 2017
1 parent 0962ba2 commit ff629a2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions source/lib/worksheet/classes/dataValidation.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,13 @@ class DataValidation { // §18.3.1.32 dataValidation (Data Validation)
this.promptTitle !== undefined ? valEle.att('promptTitle', this.promptTitle) : null;
this.prompt !== undefined ? valEle.att('prompt', this.prompt) : null;
this.sqref !== undefined ? valEle.att('sqref', this.sqref) : null;
this.formula1 !== undefined ? valEle.ele('formula1').text(cleanFormula(this.formula1)) : null;
this.formula2 !== undefined ? valEle.ele('formula2').text(cleanFormula(this.formula2)) : null;
if (this.formula1 !== undefined) {
valEle.ele('formula1').text(cleanFormula(this.formula1));
if (this.formula2 !== undefined) {
valEle.up();
valEle.ele('formula2').text(cleanFormula(this.formula2));
}
}
valEle.up();
}
}
Expand All @@ -178,8 +183,8 @@ class DataValidationCollection { // §18.3.1.33 dataValidations (Data Validation
let valsEle = ele.ele('dataValidations').att('count', this.length);
this.items.forEach((val) => {
val.addToXMLele(valsEle);
valsEle.up();
});
valsEle.up();
}
}

Expand Down

0 comments on commit ff629a2

Please sign in to comment.