Pivot table definition using power tool for open xml

Mar 1, 2012 at 7:29 AM

Hi all,

I am new to using power tools for open xml, and I really would like to implement for my diploma project an export from a database of some data to a pivot table in excel.

The problem is that in my application, the user has the option to select the "Row Labels", "Column Labels" and "Values" to be displayed in the pivot table. In the samples I found in the source code there is only a presentation of the creation of such a pivot table, without any fields displayed. 

I have seen that PivotTableDefinition has a property RowFields, but I can't manage to make it work. Can you please give me a sample in order to show me how can I initialize the pivot table?

 Thank you very much.