We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

SUM(ABOVE) numeric formats

I'm attempting to perform a nested mailmerge by passing a dataset and Word template file. In the template I create a table and display dollar figures and calculate a total amount via the SUM(ABOVE) statement. I'm using the notation \# "$#,##0.00;($#,##0.00)" throughout the Word template.

Here's what I'm seeing...

Amount1 $150.00
Amount2 $500.00
Amount3 $600.00
Total $1250.00

I have certain scenarios where the amounts in one column are all under $999.99 but added together exceed $999.99. The SUM(ABOVE) result displays with the correct amount but without the thousands separator.

I have additional columns that include single amounts over $999.99 and the SUM(ABOVE) result displays with the thousands separator.

I'm currently using Apsose.Words 11.11 so I'm hoping this issue has been fixed since then. I'm going through release notes since 11.11 but haven't found anything addressing SUM(ABOVE) and the thousands notation.

Hi there,

Thanks for your inquiry. It would be great if you please share following detail for investigation purposes.


  • Please attach your input Word document.
  • Please

    create a standalone/runnable simple application (for example a Console
    Application Project
    ) that demonstrates the code (Aspose.Words code) you used to generate
    your output document

  • Please attach the output Word file that shows the undesired behavior.
  • Please
    attach your target Word document showing the desired behavior. You can
    use Microsoft Word to create your target Word document. I will
    investigate as to how you are expecting your final document be generated
    like.

As soon as you get these pieces of information to
us we’ll start our investigation into your issue.

I’m seeing similar behavior when updating to 14.10.0 from 9.4.


When using a SUM field that looks like below it outputs to the doc without a “,”

=SUM(ABOVE) # “$#,##0.00;($#,##0.00)”

The 2nd table in the attached document sshows how Word formats the SUM field and how Aspose.Words formats it.

The attached file “SumFieldFixture-WithValues.docx” is how word formats.
The attached file “SumFieldFixture-WithValues-PostUpdate.docx” is how Aspose.Words formats it.

The code to duplicate this is 3 lines

var doc = new Document(“path.docx”);
doc.UpdateFields();
doc.Save(“newlocation.docx”);

Hi there,

Thanks for sharing the detail. I have tested the scenario using following code example and have managed to reproduce the same issue at my side.

Document doc = new Document(MyDir + “SumFieldFixture-WithValues.docx”);

doc.UpdateFields();

doc.Save(MyDir + "Out.docx");


<!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–><!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:8.0pt; mso-para-margin-left:0in; line-height:107%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri",sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}

<![endif]–>For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-11059. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-11059) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.