TotalsRow for an existing Table in Excel

I am using GemBox Spreadsheet and .NET 4.7.1.

I have tried to add a row with the total values at the end of a table that was created in a template file beforehand.

public void SetTotalsRow(string tableName, bool hasTotalsRow)
      var table = worksheet.Tables[tableName];
      table.HasTotalsRow = hasTotalsRow;

When opening the file, Excel warns that the file needs to be repaired because of the corrupted table. Without this row, the file can be opened normally.
The row still isn’t formatted correctly after repairing and appears as an additional row without the functions (Sum, Min,…) as seen in the picture.

Afterwards, I have created a new table only with GemBox and added the TotalsRow which worked as intended. So I suppose the problem is using an existing table.
I’d like to keep the formatting of the template table, so I’d like to know how this row can be added without creating a new table.

Hi Franzi,

Please try again with the current latest bugfix version:
Or the current latest NuGet package:

Does this solve your issue?

If the problem remains, please send us the original Excel file (which has a table without the total row) and the snippet code that reproduces this issue so that we can investigate it.