Pivot Table NumberFormat

M

maggie.q.li

Hi,

I have a AxPivotTable and in a nested loop, I've set the numberformat
to all fields to be "#,##0", but this is not reflected in the result.
Anyone has any idea why?

Here is my code:
foreach (Excel.PivotFieldSet fldSet in
this.suPivotTable.ActiveView.FieldSets)
{
foreach(Excel.PivotField f in fldSet.Fields)
{
this.suPivotTable.ActiveView.FieldSets[fldSet].Fields[f].NumberFormat
= "#,##0;(#,##0)";
}
}

Thanks,
Maggie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top