0.10.0 • Published 7 years ago
d2l-insights-export-utils v0.10.0
d2l-insights-export-utils
Overview
This library contains the functionality for exporting to CSV and XLSX formats
##Usage
var exportUtils = require('d2l-insights-export-utils'),
//Data must be in 2D array format
exportData = [['c1r1', 'c2r1'],['c1r2', 'c2r2']],
fileName = 'TestExportFilename';
//trigger download in xlsx format
exportUtils.exportXlsx(exportData, fileName);
//trigger download in csv format
exportUtils.exportCsv(exportData, fileName);
Dependencies: In order to decrease the size of your application, it is recommended to load the xlsx library externally. Version 0.7.7 can be loaded from the D2L CDN (this is the only version of xlsx which has been verified to work with this module)