Creating Pivot Table in Excel using Open XML and C#

半腔热情 提交于 2019-12-25 02:55:51

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/15479192/creating-pivot-table-in-excel-using-open-xml-and-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!