LinuxCommandLibrary

in2csv

converts tabular data from various formats to CSV

TLDR

Convert Excel to CSV

$ in2csv [data.xlsx] > [output.csv]
copy
Convert specific sheet
$ in2csv --sheet [Sheet1] [data.xlsx]
copy
Convert JSON to CSV
$ in2csv [data.json] > [output.csv]
copy
Specify input format
$ in2csv -f [xlsx|json|ndjson] [input]
copy
Convert fixed-width file
$ in2csv -f fixed -s [schema.csv] [data.txt]
copy

SYNOPSIS

in2csv [options] file

DESCRIPTION

in2csv converts tabular data from various formats to CSV. It's part of the csvkit toolkit for working with CSV files.
The tool handles Excel, JSON, fixed-width, and other formats. It enables piping data to other csvkit tools for analysis.

PARAMETERS

-f FORMAT

Input format (csv, xlsx, xls, json, ndjson, fixed).
--sheet NAME
Sheet name for Excel files.
-s SCHEMA
Schema file for fixed-width input.
-H, --no-header-row
Input has no header row.
-K N
Skip N lines at start.
--help
Display help information.

CAVEATS

Part of csvkit. Python-based. Large files may be slow.

HISTORY

in2csv is part of csvkit, created by Christopher Groskopf for journalists and data analysts.

SEE ALSO

csvcut(1), csvlook(1), csvstat(1), csvsql(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community