angularjs - 将 ng-grid 数据导出为 CSV 和 PDF 格式

标签 angularjs angularjs-directive

我在 angularjs 中使用 ng-grid 创建了一个网格。我想添加将网格数据导出为 CSV 和 PDF 格式的功能。AngularJS 中有可用的插件吗? 如果没有,那么有人可以建议我实现它的方法吗?

最佳答案

Angular-Grid 有一个插件可以实现这一点,但作者警告说,目前这主要是一个概念证明:

https://raw.githubusercontent.com/duro/my-angular-requiejs-example/master/vendor/angular-ui-ng-grid/plugins/ng-grid-csv-export.js

从上述存储库加载代码后,您可以将以下行添加到网格配置中:

plugins: [new ngGridCsvExportPlugin()],
showFooter: true

关于angularjs - 将 ng-grid 数据导出为 CSV 和 PDF 格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15680749/

相关文章:

javascript - jQuery、Asp.net -jAutoCalc : Implement auto calculation on the form to be appended in the table using jQuery

javascript - Angular 指令仅适用于 ng-repeat 的最后一个元素

angularjs - 为angularjs中的评论创建十进制星级

javascript - 如何相对于按钮定位 Angular Material 面板对话框?

javascript - 从同一工厂调用 Angular 工厂中的变量

javascript - 将 jQuery 代码转换为 angularjs

angularjs - orderBy 可以与 AngularUI typeahead 一起使用吗?

angularjs - 如何将 pagedown 指令设置为 $dirty?

javascript - AngularJs 自定义指令未被调用

javascript - 在 ng-repeat 中使用指令,以及范围 '@' 的神秘力量