javascript - how to use createAndFillWorkbook() in exceljs? -


i followed documentation

var workbook = createandfillworkbook(); 

and error object # has no method 'createandfillworkbook'

even if required exceljs already

var excel = require("exceljs"); 

what wanted create report somehow confused on documentation because not here how use createandfillworkbook() method says here use right away.

i referred here in documentation: https://github.com/guyonroche/exceljs#writing-xlsx

createandfillworkbook(); not mean function.(maybe pseudo function)

you must create workbook fill content.

see below.

// create workbook api. var workbook = new excel.workbook();  // must create 1 more sheet. var sheet = workbook.addworksheet("my sheet");  // can create xlsx file now. workbook.xlsx.writefile("c:\\somepath\\some.xlsx").then(function() {     console.log("xls file written."); }); 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -