How to calculate sum in Mail Merge Word Document template in Salesforce using Aspose.Words REST API

Hello,


We are using Aspose in Cloud(Salesforce.com) to print Invoice’s. I created attached word document where I am using mergefields to map data to fields in database.

Issue I have is, summing up amounts(Totals) in a table. Please refer attachment Output.png(I took snapshot of the output PDF). I have tried multiple ways, but I always ended up with zeroes.

{=SUM(ABOVE) # “#,##0.00;(#,##0.00)”}
{MERGEFIELD AUTOSUM(ABOVE) * MERGEFORMAT }

Could you please help me regarding this? I know that this question is more related to Word document/mergefields than Aspose. Just want to post, If anybody has faced this kind of experience.

Thanks for your time.

Attaching Output snapshot again. Seems like my previous attachment is having issue.


Thanks

Hi Vineel,

Thanks for your inquiry. In your case, I suggest you please use the updateFields Resource before saving the final document. Please read the detail from here:
Update Fields in a Word Document

Please let us know if you have any more queries.