Open user1702 opened 5 years ago
Using below code, not able to convert the data into one excel with mutiple sheets. I am getting all data in one sheet.
var jsonXlsx = [[{ "Name": "Eddie", "Email": "edward@mail" }], [{ "Name": "Nico", "Email": "nicolas@mail" }]] ; const sheets = ['a','b']; var excelPageData = []; /* Generate automatic model for processing (A static model should be used) */ var model = mongoXlsx.buildDynamicModel(jsonXlsx); /* Generate Excel */ excelPageData.push(mongoXlsx.mongoData2XlsxData(jsonXlsx, model)); mongoXlsx.mongoData2XlsxMultiPage(excelPageData, sheets, function(err, data) { console.log(err) console.log('File saved at:', data.fullPath); });
Using below code, not able to convert the data into one excel with mutiple sheets. I am getting all data in one sheet.