-
-
Save joepie91/807f3180e58963640b65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.convertXLSXToJSON2 = function(req, res) { | |
var path = fileServerPath + req.body.name; | |
console.log("starting..." + path); | |
var exists = fs.existsSync(path); | |
console.log("path exists? " + exists); | |
console.log("in xlsx to json 2 method...starting conversion"); | |
try { | |
var obj = asyncXLSX.parse(path); | |
console.log("obj: " + obj); | |
res.send(obj); | |
console.log("end conversion") | |
} | |
catch(ex) { | |
//console.log("throwing error"); | |
console.log("throwing error: " + ex.message); | |
res.send(ex.message); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment