Create empty Workbook unsing NodeJS
See original GitHub issueI’ve already installed js-xlsx with:
npm install xlsx
How do I create an empty Workbook using nodejs?
Example:
XLSX = require('xlsx');
var wb = new XLSX.Workbook(); // This won't work.
I want to create a new Workbook to load data from a database and then save it.
Thanks.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:5
- Comments:11 (5 by maintainers)
Top Results From Across the Web
How to create a new sheet in an existing xlsx file using xlsx ...
I would like to do something like this (this is done by using the Excel JS package): const sheet = workbookStream.addSheet('sheet1'); ... but ......
Read more >SheetJS Tutorial - Create xlsx with Javascript - Red Stapler
Now let's start with creating a new workbook by calling book_new() utility function which will return an empty workbook object.
Read more >Generate Excel with Node.js - Pagorn Phusaisakul
Basic usage of sheetjs (xlsx package for Node.js). “Generate Excel with Node.js” is published by Pagorn Phusaisakul.
Read more >Read/Write Excel File in Node.js using XLSX
How to create an excel sheet using JSON data. Step 1: Install the XLSX package using npm or bower npm i --save xlsx...
Read more >Beginner's Guide to exceljs. Handling spreadsheet data in ...
For your information, some of the features in exceljs are highly dependent on node.js built-in packages. For example, the save file ...
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
I ran into this too. So, I made a module to make it easier to create new workbooks and do simple editing of existing workbooks.
https://github.com/waylonflinn/xlsx-workbook
Here’s a snippet from the docs:
Hi @arthurspa, just picked up js-xlsx this evening so there may well be a better answer, but following the example at http://sheetjs.com/demos/writexlsx.html I’ve noticed that something like:
seems to be a sufficient to initialize a Workbook object.
That is, any object (map) with a
SheetNames
array andSheets
map can (whenSheetNames
andSheets
are correctly populated) be saved as described at https://github.com/SheetJS/js-xlsx#writing-workbooks.