deno.land / x / sheetjs@v0.18.3 / modules / numbers_to_csv.node.ts

numbers_to_csv.node.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env ts-node/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */import { read } from 'cfb';import { utils } from 'xlsx';import parse_numbers from './src/numbers';
var f = process.argv[2];var cfb = read(f, {type: "file"});var wb = parse_numbers(cfb);var sn = process.argv[3];if(typeof sn == "undefined") { wb.SheetNames.forEach(sn => console.log(utils.sheet_to_csv(wb.Sheets[sn])));} else { if(sn && !isNaN(+sn)) sn = wb.SheetNames[+sn]; if(wb.SheetNames.indexOf(sn) == -1) sn = wb.SheetNames[0]; console.log(utils.sheet_to_csv(wb.Sheets[sn]));}
sheetjs
📗 SheetJS Community Edition -- Spreadsheet Data Toolkit
GitHub RepositorySheetJS/sheetjs
GitHub Stars
32183

Version Info

Tagged at
11 months ago