Linux command
in2csv 命令
文件
涉及管道、覆盖或删除,执行前请先确认路径和参数。
常用示例
Convert Excel to CSV
in2csv [data.xlsx] > [output.csv]
Convert specific sheet
in2csv --sheet [Sheet1] [data.xlsx]
Convert JSON to CSV
in2csv [data.json] > [output.csv]
Specify input format
in2csv -f [xlsx|json|ndjson] [input]
Convert fixed-width file
in2csv -f fixed -s [schema.csv] [data.txt]
说明
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.
参数
- -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.
FAQ
What is the in2csv command used for?
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.
How do I run a basic in2csv example?
Run `in2csv [data.xlsx] > [output.csv]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -f _FORMAT_ do in in2csv?
Input format (csv, xlsx, xls, json, ndjson, fixed).