我想使用报告过滤器在excel中导出数据透视表,我目前正在使用EPPLUS但是epplus无法实现。请有人告诉我应该使用哪个库来导出带有报告过滤器的数据库。
答案 0 :(得分:1)
You can try to use Microsoft.Office.Interop.Excel for pivot tables in Excel using C#.
A code example of using pivot table of the Office.Interop is:
PivotTable pt = (PivotTable)activeWorksheet.PivotTables("PivotTable1");
PivotField pf = (PivotField)pt.PivotFields(11);
pf.ClearAllFilters();
This article also gives more information about creating pivot tables.
https://blogs.msdn.microsoft.com/andreww/2008/07/25/creating-a-pivottable-programmatically/