Excel file is not created nor saved
See original GitHub issueI am following the documentation to create an excel workbook and add worksheet to it. This is my code:
var Excel = require('exceljs');
var workbook = new Excel.Workbook();
var worksheet = workbook.addWorksheet('My Sheet');
worksheet.columns = [
{ header: 'Id', key: 'id', width: 10 },
{ header: 'Name', key: 'name', width: 32 },
{ header: 'D.O.B.', key: 'DOB', width: 10 }
];
worksheet.addRow({id: 1, name: 'John Doe', dob: new Date(1970,1,1)});
worksheet.addRow({id: 2, name: 'Jane Doe', dob: new Date(1965,1,7)});
workbook.commit();
workbook.xlsx.writeFile('./temp.xlsx').then(function() {
// done
console.log('file is written');
});
However, it does not create any excel file. Nothing happens. What am I doing wrong here?
Issue Analytics
- State:
- Created 7 years ago
- Comments:10
Top Results From Across the Web
How to troubleshoot errors when you save Excel workbooks
Possible reasons why documents don't save ... Select the tab that applies to you, or go to the "Quick resolution" section. ... If...
Read more >Don't Panic! Here's How to Recover an Excel File Not Saved
To restore your new file without any saved updates, open Microsoft Excel first. Then, click Open on the File tab on the Ribbon....
Read more >Microsoft Excel Document not saved error [Fixed]
Save the Excel workbook with a new filename. · Move the original workbook to a new workbook. · Terminate the interrupting program or...
Read more >2 ways to recover unsaved Excel files - Journal of Accountancy
For the first scenario described above, the way to recover your never-before-saved file is to, first, open Microsoft Excel. Then go to the...
Read more >Fix Excel File Error 'Unable to Save Excel Workbook'
There may be an issue with the Build version or the Registry Values settings may not be appropriate, which does not allow the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Its working finally.
This isn’t the same though. You’re not using streaming api anymore.