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

Free Support Forum - aspose.com

=SUM( ) does not add up columns with more than one entry per cell

Hi,


I am running version 11.11. of Aspose.Words (because of .NET 1.1, soon to upgrade :slight_smile: )

If I mail merge a document (or update fields) with the following,

Row 1

£1000.00

Row 2

£1000.00

Row 3

£1000.00

Total

{ =SUM(B1,B2,B3) }


The total is correctly £3000

if there is more than one entry in a cell (and I need this for when using mergefields that do not exist, that should not cause empty lines), the total does not work

i.e.

Row 1

£1000.00

Row 2

£1000.00

£50.00

Row 3

£1000.00

Total

{ =SUM(B1,B2,B3) }

reports £2000 in hte total, as row 2 is ignored.

Word correctly adds these up, you can put any number of values in one cell

I also notice that one of the values must be a mail merge field for this to work, this is fine as I use them, a user update is required in word otherwise. Please see the working and not working examples that both contain mail merge fields.

Is this something that can be included with version 11.11, or only the newer 13.x for > .net 1.1

I have not tried this on 13.x

Kind Regards

Chris

I have now checked this in .NET 2.0 with 13.12.0.0.


The same thing occurs. I have also examples of a fairly complex =SUM causing an exception and producing no output at all.

Will this be fixed in the 13.x versions and/or the 11.x versions?

Chris

Hi Chris,

Thanks for your inquiry. I have tested the scenario by using following code example and have managed to reproduce the same issue at my side. Aspose.Words does not update SUM formula field. The sum field does not work for both documents NOT_WORKING.rtf and NOT_WORKING.rtf. I have attached the output documents with this post.


Document
doc = new Document(MyDir

  • "WORKING.rtf ");

doc.MailMerge.Execute(new string[] { "_PBASICFEE_" }, new object[] { 100 });

doc.UpdateFields();

doc.Save(MyDir + "case1-Out.rtf");


<!–[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>AR-SA</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:10.0pt; mso-para-margin-left:0in; line-height:115%; 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-9474. 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.

Thanks Tahir,


I think that sometimes the calculation does work. I paired the document down for the example, it stared out being more complicated where I think some of the =SUM did work (but not all). As you say though, in these cases, SUM didn’t work!

Chris

Hi Chris,

Thanks for your feedback. We will update you via this forum thread once this issue is resolved. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.

Hi Tahir,

is this fixed in 14.2?

Many Thanks

Chris

Hi Chris,

Thanks for your inquiry. I have verified the status of WORDSNET-9474 from our issue tracking system and regret to share with you that this issue is not resolved yet. Hopefully, the fix of this issue will be available in March 2014 release. Please note that this estimate is not final at the moment; I will be sure to inform you via this forum thread as soon as your issues are resolved.

We really appreciate your patience.


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


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