急求如何在asp.net 下使用office web components控件,实现数据透视表。
如题,如何在asp.net 下使用office web components控件,实现数据透视表。
代码如下:
// 将一个DataTable对象的数据填充到Sheet工作表中,作为给透视表的数据源
SpreadsheetClass sheet = this.CreateSheetDataSource(dt);
PivotTableClass pivotTable = new PivotTableClass() { DataSource = (msdatasrc.DataSource)sheet };
PivotView view = pivotTable.ActiveView;
view.ColumnAxis.InsertFieldSet(view.FieldSets["name"]); // 其他信息: 无效的类字符串
但是,最后总是报错,感觉是数据源设置有错误,请问谁有详细的源码让我学习,或是提供一些资料。
网上的资料抖翻边了,没有什么有用的。