Skip to content

Releases: zitsen/xlsx2csv.rs

v0.4.5

07 Nov 10:08
Compare
Choose a tag to compare
chore: Release xlsx2csv version 0.4.5

v0.4.4

07 Nov 09:53
Compare
Choose a tag to compare
chore: Release xlsx2csv version 0.4.4

v0.4.3

06 Apr 15:24
Compare
Choose a tag to compare
(cargo-release) xlsx2csv version 0.4.3

v0.4.2

08 Apr 06:58
Compare
Choose a tag to compare
(cargo-release) xlsx2csv version 0.4.2

v0.4.1

18 Jan 06:43
Compare
Choose a tag to compare
(cargo-release) xlsx2csv version 0.4.1

release-test

05 Nov 06:24
Compare
Choose a tag to compare
chore: fix bad credentials

v0.3.0

15 Sep 08:56
Compare
Choose a tag to compare

output sheets one-by-one

Simple usage is similar to ssconvert syntax, like this:

xlsx2csv input.xlsx sheet1.csv sheet2.csv

This will output the first to sheet1.csv, the second to sheet2.csv, and ignore other sheets.

pipe output

If no output position args setted, eg. xlsx2csv input.xlsx, it'll write first sheet to stdout. So the two commands are equal:

  • xlsx2csv input.xlsx sheet1.csv
  • xlsx2csv input.xlsx > sheet1.csv.

If you want to select specific sheet to stdout, use -s/--select <id or name> (id is 0-based):

xlsx2csv input.xlsx -s 1

In previous command, it'll output the second(0-based 1 is the second) sheet to stdout.

list sheetnames

Use --list/-l it will just print all the sheetnames by id.

xlsx2csv --list
xlsx2csv -l

multiple sheets without filename setted

If there's many sheets that you don't wanna set filename for each,
use -u/--use-sheet-names to write with sheetnames.

xlsx2csv input.xlsx -u

If you want to write to directory other than ., use -w/--workdir along with -u option.

xlsx2csv input.xlsx -u -w test/

The filename extension is detemined by delimiter, , to .csv, \t to .tsv, others will treat as ','.

multiple sheets matching or not matching a regex pattern

By default, it will output all sheets, but if you want to select by sheet names with regex match, use -I/--include to include only matching, and -X/--exclude to exclude matching.
You could also combine these two option with include-first-exclude-after order:

xlsx2csv input.xlsx -I 'a\d+'
xlsx2csv input.xlsx -X '\s'
xlsx2csv input.xlsx -I '\S{3,}' -X 'Sheet'

The last command line will first include all sheet with pattern '\S{3,}' matched and then exclude that match Sheet.

v0.1.1

20 Mar 04:52
Compare
Choose a tag to compare

Bug Fixes

  • print out error in case of range size is 0 (578115b)