I've been struggling to get a handle on OpenXML and my most recent roadblock has been TotalsRows.
I've tried using combinations of the following:
Table table = new Table
{
Id = tableIDIndex,
Name = "Table" + tableIDIndex,
DisplayName = "Table" + tableIDIndex,
Reference = reference,
TotalsRowCount = 1,
TotalsRowShown = true,
HeaderRowCount = 1
};
and modifying TableColumns:
TableColumn nextColumn = new TableColumn()
{
Id = currentIndex,
Name = stringTable.SharedStringTable.ElementAt(int.Parse(nextCell.InnerText)).InnerText,
TotalsRowFunction = TotalsRowFunctionValues.Sum
};
tableColumns.AppendChild(nextColumn);
The output I constantly create is correctly set to "Sum" within the excel cell but no data exists within. Excel Result
Any ideas or help would be appreciated, and I can provide additional example code if needed.