How to use the xlsjs.utils function in xlsjs

To help you get started, we’ve selected a few xlsjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vinothbabu / excel-to-json / lib / index.js View on Github external
VB.prototype.getCsv = function(ws) {
  return csv_file = xlsjs.utils.make_csv(ws)
}
github jsreport / jsreport / extension / excel-parser / lib / excelParser.js View on Github external
reporter.beforeRenderListeners.add(definition.name, this, function(req, res) {

        if (req.files && req.files.file) {
            var file = req.files.file;

            if (path.extname(file.path) === ".xls") {
                //TODO async!!!!
                var xls = XLS.readFile(file.path);
                var data = XLS.utils.sheet_to_row_object_array(xls.Sheets.Sheet1);
                req.data = { rows: [] };

                data.forEach(function(r) {
                    var item = {};

                    for (var key in r) {
                        if (r.hasOwnProperty(key))
                            item[key] = r[key];
                    }

                    req.data.rows.push(item);
                });
            }
        }
    });
};

xlsjs

Excel 5.0/95 and 97-2004 spreadsheet (BIFF5 XLS / BIFF8 XLS / XML 2003) parser

Apache-2.0
Latest version published 6 years ago

Package Health Score

52 / 100
Full package analysis

Popular xlsjs functions