HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

in2csv — Convert various tabular data formats to CSV. Included in csvkit. More information: <https://csvkit.r

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandvariousformatsconvertclitabulardatain2csv

Problem

How to use the in2csv command: Convert various tabular data formats to CSV. Included in csvkit. More information: <https://csvkit.readthedocs.io/en/latest/scripts/in2csv.html>.

Solution

in2csv — Convert various tabular data formats to CSV. Included in csvkit. More information: <https://csvkit.readthedocs.io/en/latest/scripts/in2csv.html>.

Convert an XLS file to CSV:
in2csv {{data.xls}}


Convert a DBF file to a CSV file:
in2csv {{data.dbf}} > {{data.csv}}


Convert a specific sheet from an XLSX file to CSV:
in2csv --sheet={{sheet_name}} {{data.xlsx}}


Pipe a JSON file to in2csv:
cat {{data.json}} | in2csv {{[-f|--format]}} json > {{data.csv}}

Code Snippets

Convert an XLS file to CSV

in2csv {{data.xls}}

Convert a DBF file to a CSV file

in2csv {{data.dbf}} > {{data.csv}}

Convert a specific sheet from an XLSX file to CSV

in2csv --sheet={{sheet_name}} {{data.xlsx}}

Pipe a JSON file to in2csv

cat {{data.json}} | in2csv {{[-f|--format]}} json > {{data.csv}}

Context

tldr-pages: common/in2csv

Revisions (0)

No revisions yet.