shawnbot/tito

Add Excel format support

Aperta

#8 aperta il 1 apr 2015

 (0 commenti) (0 reazioni) (0 assegnatari)JavaScript (0 fork)github user discovery
enhancementhelp wanted

Metriche repository

Star
 (22 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Looks like js-xlsx is the most eligible candidate because it does parsing and formatting (and reads from a buffer, which is necessary for stdio). The read and write APIs are synchronous, but we could do something similar to what the HTML parser does and just buffer all the data until the end of the stream.

CLI API for reading:

# just read the first sheet
tito --read excel data.xls
# read the second sheet (1-based index?)
tito --read.format excel --read.sheet 2
# read a named sheet
tito --read.format excel --read.sheet "Sheet Name"

and writing:

# what should the default sheet name be? "Data"?
tito --read csv --write excel
tito --read csv --write.format excel --write.sheet "Sheet Name"

Guida contributor