View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Greg Fricke Greg Fricke is offline
external usenet poster
 
Posts: 2
Default Is it possible to override totalling function/values?

I have a pivot table I am generating programmatically. I have the
totalling information as part of my result set. I want to override
the totalling values with my result set's data.

I am able to grab the totalling rows/columns, but it is quite messy
depending on the possibility of subtotaling at many levels. I also am
unable to actually override the value, it does nothing.

Using VSTO:
var grandTotalRow =
pivotTable.DataBodyRange.Rows[pivotTable.DataBodyRange.Rows.Count];
grandTotalRow.Value2[1,1] = 666
but the value remains its' original value.

Is it possible either overwrite the value or the formula to use data
on another sheet/object?