Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. const file = 'https://docs.google.com/spreadsheets/d/1YDBW6jIn4jCgXg7V7g6d3dSmIzDIFqGmsgRSnnXkUbI/export?format=xlsx&id=1YDBW6jIn4jCgXg7V7g6d3dSmIzDIFqGmsgRSnnXkUbI'
  2.  
  3. const fs = require('fs');
  4. const download = require('download');
  5.  
  6. download(file, 'dist')
  7. .then(() => {
  8. console.log('done!');
  9.  
  10. node_xj = require("xls-to-json");
  11. node_xj({
  12. input: "./dist/localization.xlsx", // input xls
  13. output: "output.json", // output json
  14. sheet: "List 1", // specific sheetname
  15. rowsToSkip: 0 // number of rows to skip at the top of the sheet; defaults to 0
  16. }, function (err, result) {
  17. if (err) {
  18. console.error(err);
  19. } else {
  20. console.log(result);
  21. }
  22. });
  23. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement