c# - Excel AddIn : Hide a datafield in a pivottable -


i'm trying control excel (2010) pivottable vsto (excel addin) in c# (4.0). i've got no problem adding pivotfields (dimensions) , datafields (measures) pivottable. problem can't remove datafield.

my datafield pivotfield object. i've tried :

mydatafield.hidden = true; mydatafield.displayinreport = false; mydatafield.orientation = xlpivotfieldorientation.xlhidden;  // last 1 use remove (dimension) pivotfield 

every 1 of these lines throws com exception absolutely no information in it. thing have message : "exception de hresult : 0x800a03ec", seems common every vsto exception.

if has solution, me lot.

ever tried unhide again? can't it...

datafieldorderbookamount.orientation = xlpivotfieldorientation.xldatafield 

always throws me error!


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -