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

Free Support Forum - aspose.com

How to sum numbers in table's column using .NET

I have been working with an issue where we have to add a line at the end of the table which will has total of the above date. For example, we have a table which has two columns like this, the last row of the table must be added automatically after the table ends. Can I know if there is any function that aspose supports image.png (3.5 KB)


In your case, we suggest you please insert the SUM(ABOVE) field in the last row of table. You need to add a row to table and insert this field to get the desired output. Please check the following code example. Hope this helps you.

Document doc = new Document(MyDir + "input.docx");
Table table = (Table)doc.GetChild(NodeType.Table, 0, true);

foreach (Cell cell in table.LastRow.Cells)

DocumentBuilder builder = new DocumentBuilder(doc);
builder.InsertField(@" =SUM(ABOVE) ");
doc.Save(MyDir + "output.docx");

Hi @ tahir.manzoor
It worked. Thank you