Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

untitled notebook

node v6.17.1
version: master
endpointsharetweet
/* original data */ var data = [ {"name":"John", "city": "Seattle"}, {"name":"Mike", "city": "Los Angeles"}, {"name":"Zach", "city": "New York"} ]; /* this line is only needed if you are not adding a script tag reference */ if(typeof XLSX == 'undefined') XLSX = require('xlsx'); /* make the worksheet */ var ws = XLSX.utils.json_to_sheet(data); /* add to workbook */ var wb = XLSX.utils.book_new(); XLSX.utils.book_append_sheet(wb, ws, "People"); /* write workbook */ XLSX.write(wb, {bookType:'xlsx', type:'buffer'});
Loading…

no comments

    sign in to comment