Skip to content

Commit

Permalink
upstream-fix: in CT_CellFormula ensure the siField is written int…
Browse files Browse the repository at this point in the history
…o `fField`'s attributes on `Write` even when it has a default value for cases when the type of the formula is Shared formula.
  • Loading branch information
Artem Koloskov committed Mar 12, 2024
1 parent 5a189bb commit b89af43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OpenXmlFormats/Spreadsheet/Sheet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2701,7 +2701,7 @@ internal void Write(StreamWriter sw, string nodeName)
XmlHelper.WriteAttribute(sw, "r1", this.r1);
XmlHelper.WriteAttribute(sw, "r2", this.r2);
XmlHelper.WriteAttribute(sw, "ca", this.ca, false);
if(this.si!=0)
if(this.t == ST_CellFormulaType.shared || this.si!=0)
XmlHelper.WriteAttribute(sw, "si", this.si, true);
XmlHelper.WriteAttribute(sw, "bx", this.bx, false);
if (!string.IsNullOrEmpty(this.valueField))
Expand Down

0 comments on commit b89af43

Please sign in to comment.