sheetjs_sheetjs/demos/google-sheet/index.js
Francisco Presencia 6ecfeb602b Added google sheet example
Description

Added to readme

Fixed typo
2020-10-20 11:45:59 +09:00

18 lines
440 B
JavaScript

import xlsx from "xlsx";
import drive from "drive-db";
(async () => {
const data = await drive("1fvz34wY6phWDJsuIneqvOoZRPfo6CfJyPg1BYgHt59k");
/* Create a new workbook */
const workbook = xlsx.utils.book_new();
/* make worksheet */
const worksheet = xlsx.utils.json_to_sheet(data);
/* Add the worksheet to the workbook */
xlsx.utils.book_append_sheet(workbook, worksheet);
xlsx.writeFile(workbook, "test.xlsx");
})();