Created
September 20, 2022 05:17
-
-
Save manniru/5b1b819e1fb6b5f5139a76dfc4b07c78 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const XLSX = require('xlsx');const data = [ | |
{ name: 'Diary', code: 'diary_code', author: 'Pagorn' }, | |
{ name: 'Note', code: 'note_code', author: 'Pagorn' }, | |
{ name: 'Medium', code: 'medium_code', author: 'Pagorn' }, | |
]const workSheet = XLSX.utils.json_to_sheet(data); | |
const workBook = XLSX.utils.book_new();XLSX.utils.book_append_sheet(workBook, workSheet, "Sheet 1"); | |
XLSX.writeFile(workBook, "./temp/sample.xlsx"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment