Skip to content

Commit

Permalink
Merge pull request nissl-lab#1291 from jake-codes-at-5-am/fix-ct-form…
Browse files Browse the repository at this point in the history
…ulacell-write

CT_CellFormula.Write: fix writing the si attribute
  • Loading branch information
tonyqus authored Apr 2, 2024
2 parents 462f15f + b89af43 commit 17041e5
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 17041e5

Please sign in to comment.