I\'m working in NodeJS and I would like to export a JSON-format object to an Excel file.
I am well aware that there are (at least) three npm packages for that purpose, b
You can write to csv (comma-separated values) text file without any additional library. This extension open in Excel by default.
var fs = require('fs');
var file = fs.createWriteStream('file.csv', {'flags': 'w', autoClose: true});
var result = '';
for (var hashkey in myObject)
result += hashkey + ';' + myObject[hashkey].keyA + ';' + myObject[hashkey].keyB + '\n';
file.write(result);