我正在使用 Sencha Grid Exporter 插件,虽然它在导出到 Excel 时工作得很好,但我无法将它从我的应用程序导出到 CSV 或任何其他类型。
它工作正常,如 KitchenSink 示例中所列。
http://docs.sencha.com/extjs/6.2.1/classic/Ext.grid.plugin.Exporter.html
Ext.getCmp('grid').saveDocumentAs({
type: 'csv', // What other possible values can go here
title: globals.reportName,
fileName: 'myExport.csv'
});
带有如下错误:
Uncaught Error: [Ext.createByAlias] Unrecognized alias: exporter.CSV
at Ext.Inventory.instantiateByAlias (app.js?_dc=1481916938387:13520)
at Ext.Factory.create (app.js?_dc=1481916938387:23199)
at constructor.getExporter (app.js?_dc=1481916938387:204593)
at constructor.saveDocumentAs (app.js?_dc=1481916938387:204520)
at constructor.saveDocumentAs (app.js?_dc=1481916938387:5355)
at constructor.onMenuitemClick (app.js?_dc=1481916938387:255332)
at constructor.fire (app.js?_dc=1481916938387:19281)
at constructor.doFireEvent (app.js?_dc=1481916938387:20248)
at constructor.doFireEvent (app.js?_dc=1481916938387:65488)
at constructor.prototype.doFireEvent (app.js?_dc=1481916938387:56438)