简体   繁体   中英

Creating Pivot Table in Excel using Open XML and C#

I used store a data into the DataTable and wants to create a Pivot Table using this data.

I have gone through many posts and also read the Microsoft's documentation on creating Pivot table through Open XML but couldn't get the solution. Can anyone please post some code to create Pivot table.

Thanks in advance.

Install the Open XML SDK , it contains a tool called Open XML SDK Productivity Tool.

How to use it:

Open Excel and create a file containing a Pivot table. Save it and open it with the Productivity Tool. In this tool is an option to 'Reflect the code', that way you can see how to create the same Excel by using C# code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM