Thanks for your query.
You may please give a try to the following sample code and provide your feedback. If it does not fulfill your requirement, provide us a runnable console application, a source template file, program output file and an expected output file created by Excel. Also explain the requirement using some images for clarification. We will analyze the information and provide our feedback.
Workbook book = new Workbook("Example.xlsx");
PivotTable table = book.Worksheets["Pivot Table"].PivotTables;
table.RowGrand = false; //Set true if you wish to show the grand row total
table.ColumnGrand = false; //Set true if you wish to show the grand column total
for (int i = 0; i < table.RowFields.Count; i++)