Skip to content

Commit

Permalink
Use result for formula hyperlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
holm authored and papandreou committed Apr 25, 2018
1 parent 6c75f87 commit 40865c9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/xlsx/xform/sheet/cell-xform.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,14 @@ utils.inherits(CellXform, BaseXform, {
// look for hyperlink
var hyperlink = options.hyperlinkMap[model.address];
if (hyperlink) {
if (model.type === Enums.ValueType.Formula) {
model.text = model.result;
model.result = undefined;
} else {
model.text = model.value;
model.value = undefined;
}
model.type = Enums.ValueType.Hyperlink;
model.text = model.value;
model.value = undefined;
model.hyperlink = hyperlink;
}
}
Expand Down

0 comments on commit 40865c9

Please sign in to comment.