All Projects → zitsen → xlsx2csv.rs

zitsen / xlsx2csv.rs

Licence: Apache-2.0, MIT licenses found Licenses found Apache-2.0 LICENSE-APACHE MIT LICENSE-MIT
Excel (eg. .xlsx/.xls) to CSV/TSV Format Converter in Rust

Programming Languages

rust
11053 projects
shell
77523 projects

Projects that are alternatives of or similar to xlsx2csv.rs

XToolset
Typed import, and export XLSX spreadsheet to JS / TS. Template-based create, render, and export data into excel files.
Stars: ✭ 110 (+134.04%)
Mutual labels:  spreadsheet, worksheet
sheet2dict
Simple XLSX and CSV to dictionary converter
Stars: ✭ 206 (+338.3%)
Mutual labels:  spreadsheet, worksheet
1clickBOM
A browser extension to quickly fill shopping carts with electronic components.
Stars: ✭ 76 (+61.7%)
Mutual labels:  spreadsheet
keikai-tutorial
A tutorial of a web spreadsheet component, keikai
Stars: ✭ 19 (-59.57%)
Mutual labels:  spreadsheet
xivraidteam
discord と連携して ロット管理、スケジュール管理 を自動化した FF14 零式 固定管理用スプレッドシート
Stars: ✭ 20 (-57.45%)
Mutual labels:  spreadsheet
xls-cli
A simple cli tool to explore xls files
Stars: ✭ 25 (-46.81%)
Mutual labels:  spreadsheet
xltpl
A python module to generate xls/x files from a xls/x template.
Stars: ✭ 46 (-2.13%)
Mutual labels:  spreadsheet
spreadsheet
TypeScript/javascript spreadsheet parser, with formulas.
Stars: ✭ 40 (-14.89%)
Mutual labels:  spreadsheet
fxl
fxl is a Clojure spreadsheet library
Stars: ✭ 117 (+148.94%)
Mutual labels:  spreadsheet
HTML-templating-with-Google-Apps-Script
Use data from your spreadsheets to build a webpage or a client-side app ✨
Stars: ✭ 55 (+17.02%)
Mutual labels:  spreadsheet
BakingSheet
Easy datasheet management for C# and Unity. Supports Excel, Google Sheet, JSON and CSV format.
Stars: ✭ 144 (+206.38%)
Mutual labels:  spreadsheet
PlotsOfData
Shiny App for comparison of samples
Stars: ✭ 47 (+0%)
Mutual labels:  spreadsheet
Spreadsheet
A spreadsheet app designed for elementary OS
Stars: ✭ 66 (+40.43%)
Mutual labels:  spreadsheet
js-harb
❌ Host of Archaic Representations of Books (now merged in http://github.com/sheetjs/js-xlsx )
Stars: ✭ 55 (+17.02%)
Mutual labels:  spreadsheet
Depot
Structured data editor built inside VS Code
Stars: ✭ 136 (+189.36%)
Mutual labels:  spreadsheet
stream-list-updater
Automation for updating an index of live George Floyd protest streams
Stars: ✭ 15 (-68.09%)
Mutual labels:  spreadsheet
grist-core
Grist is the evolution of spreadsheets.
Stars: ✭ 3,549 (+7451.06%)
Mutual labels:  spreadsheet
easy-excel
🚀 快速读写Excel文件,简单高效
Stars: ✭ 118 (+151.06%)
Mutual labels:  spreadsheet
websheetjs
Lightweight JS library to render website sections with data from Google Spreadsheets
Stars: ✭ 29 (-38.3%)
Mutual labels:  spreadsheet
Dexiom.EPPlusExporter
A very simple, yet incredibly powerfull library to generate Excel documents out of objects, arrays, lists, collections, etc.
Stars: ✭ 19 (-59.57%)
Mutual labels:  spreadsheet

xlsx2csv - An Excel-like spreadsheet to CSV coverter writen in Rust.

USAGE:
    xlsx2csv [FLAGS] [OPTIONS] <xlsx> [output]...

FLAGS:
    -h, --help               Prints help information
    -i, --ignore-case        Rgex case insensitivedly
    -l, --list               List sheet names by id
    -u, --use-sheet-names    Use sheet names as output filename prefix (in current dir or --workdir)
    -V, --version            Prints version information

OPTIONS:
    -d, --delimiter <delimiter>    Delimiter for output [default: ,]
    -X, --exclude <exclude>        A regex pattern for matching sheetnames to exclude, used with '-u'
    -I, --include <include>        A regex pattern for matching sheetnames to include, used with '-u'
    -s, --select <select>          Select sheet by name or id in output, only used when output to stdout
    -w, --workdir <workdir>        Output files location if `--use-sheet-names` setted

ARGS:
    <xlsx>         Input Excel-like files, supports: .xls .xlsx .xlsb .xlsm .ods
    <output>...    Output each sheet to sperated file

Install

cargo install xlsx2csv

Advanced Usage

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.

Detailed options

The following is printed by xlsx2csv --help

USAGE:
    xlsx2csv [FLAGS] [OPTIONS] <xlsx> [output]...

FLAGS:
    -h, --help               
            Prints help information

    -i, --ignore-case        
            Regex case insensitivedly.
            
            When this flag is provided, the include and exclude patterns will be searched case insensitively. used with
            '-u'.
    -l, --list               
            List sheet names by id

    -u, --use-sheet-names    
            Use sheet names as output filename prefix (in current dir or --workdir)

    -V, --version            
            Prints version information


OPTIONS:
    -d, --delimiter <delimiter>    
            Delimiter for output.
            
            If `use-sheet-names` setted, it will control the output filename extension: , -> csv, \t -> tsv [default: ,]
    -X, --exclude <exclude>        
            A regex pattern for matching sheetnames to exclude, used with '-u'

    -I, --include <include>        
            A regex pattern for matching sheetnames to include, used with '-u'

    -s, --select <select>          
            Select sheet by name or id in output, only used when output to stdout

    -w, --workdir <workdir>        
            Output files location if `--use-sheet-names` setted


ARGS:
    <xlsx>         
            Input Excel-like files, supports: .xls .xlsx .xlsb .xlsm .ods

    <output>...    
            Output each sheet to seprated file.
            
            If not setted, output first sheet to stdout.

License

MIT OR Apache-2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].