Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/* xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
/* from the electron quick-start */
var electron = require('electron');
var XLSX = require('xlsx');
var app = electron.app;
var win = null;
function createWindow() {
if(win) return;
win = new electron.BrowserWindow({width:800, height:600});
win.loadURL("file://" + __dirname + "/index.html");
win.webContents.openDevTools();
win.on('closed', function() { win = null; });
}
if(app.setAboutPanelOptions) app.setAboutPanelOptions({ applicationName: 'sheetjs-electron', applicationVersion: "XLSX " + XLSX.version, copyright: "(C) 2017-present SheetJS LLC" });
app.on('open-file', function() { console.log(arguments); });
app.on('ready', createWindow);
app.on('activate', createWindow);
app.on('window-all-closed', function() { if(process.platform !== 'darwin') app.quit(); });
/* xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
var XLSX = require('xlsx');
console.log(XLSX.version);
var w = XLSX.read('abc,def\nghi,jkl', {type:'binary'});
var j = XLSX.utils.sheet_to_json(w.Sheets[w.SheetNames[0]], {header:1});
console.log(j);
to_html_cols: to_html_cols,
to_formulae: to_formulae,
to_md: to_md,
to_dif: util('dif'),
to_sylk: util('slk'),
to_eth: util('eth'),
to_socialcalc: util('eth'),
get_cols: get_cols
};
var J = ({
XLSX: X,
XLS: X,
readFile:readFileSync,
read:read,
utils: utils,
version: "XLSX " + X.version
}/*:any*/);
if(typeof module !== 'undefined') module.exports = J;
import * as XLSX from 'xlsx';
import * as fs from 'fs';
const version: string = XLSX.version;
const SSF = XLSX.SSF;
const read_opts: XLSX.ParsingOptions = {
type: "buffer",
raw: false,
cellFormula: false,
cellHTML: false,
cellNF: false,
cellStyles: false,
cellText: false,
cellDates: false,
dateNF: "yyyy-mm-dd",
sheetStubs: false,
sheetRows: 3,
bookDeps: false,