ember-html-table-to-excel is an addon that converts html tables to Excel documents in your Ember.js application. ember-cli-data-export-with-style is used in background.
cd your-project-directory
ember install ember-html-table-to-excel
After installing ember-cli-data-export-with-style dependency, you need to import following 4 javascript files directly from the imported addon such as:
included: function(app) {
this._super.included(app);
app.import('node_modules/ember-cli-data-export-with-style/vendor/Blob.js');
app.import('node_modules/ember-cli-data-export-with-style/vendor/FileSaver.js');
app.import('node_modules/ember-cli-data-export-with-style/vendor/jszip.min.js');
app.import('node_modules/ember-cli-data-export-with-style/vendor/xlsx.core.min.js');
}
You can use as ember-html-table-to-excel-button
component with tableId
(and optional fileName
, sheetName
and headerRows
(array)) parameters.
Checkout live examples at ember-html-table-to-excel demo page
This project is licensed under the MIT License.