2017-09-05 05:26:50 +00:00
|
|
|
/* xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
|
2017-03-28 04:41:01 +00:00
|
|
|
var fs = require('fs');
|
2017-08-19 23:06:34 +00:00
|
|
|
var xlsx = require('../../dist/xlsx.full.min');
|
2017-03-28 04:41:01 +00:00
|
|
|
var page = require('webpage').create();
|
|
|
|
|
2017-09-24 23:40:09 +00:00
|
|
|
page.open('http://oss.sheetjs.com/js-xlsx/tests/', function(status) {
|
2017-03-28 04:41:01 +00:00
|
|
|
|
|
|
|
var data = fs.read('sheetjs.xlsx', {mode: 'rb', charset: 'utf8'});
|
|
|
|
var workbook = xlsx.read(data, {type: 'binary'});
|
|
|
|
data = xlsx.utils.sheet_to_csv(workbook.Sheets['SheetJS']);
|
|
|
|
console.log("Data: " + data);
|
|
|
|
|
|
|
|
phantom.exit();
|
|
|
|
});
|
|
|
|
|