var fs = require('fs'); var chrome=""; //同步执行 function tongbu(){ var data =fs.readFileSync("C:\\Users\\zz\\Desktop\\demo.txt"); // 终端打印如下信息 console.log("我是同步执行的结果集:"+data.toString()); } //异步执行后回调 function yibu(){ fs.readFile(
首先我们先引用一个Excel的类库xlsx.full.min.js 中间处理: 'use strict'; var ExcelReader = { isFirstRead: true, fixdata: function (data) { var o = "", l = 0, w = 10240; for (; l < data.byteLength / w; ++l) o += String.fromCharCode.apply(null, new Uint8Array(dat