Files
tldr/pages.zh/common/in2csv.md

21 lines
505 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# in2csv
> 将各种表格数据格式转换为 CSV。
> 包含在 csvkit 中。
> 更多信息:<https://csvkit.readthedocs.io/en/latest/scripts/in2csv.html>。
- 将 XLS 文件转换为 CSV
`in2csv {{data.xls}}`
- 将 DBF 文件转换为 CSV 文件:
`in2csv {{data.dbf}} > {{data.csv}}`
- 将 XLSX 文件中的特定工作表转换为 CSV
`in2csv --sheet={{sheet_name}} {{data.xlsx}}`
- 将 JSON 文件通过管道传输到 in2csv
`cat {{data.json}} | in2csv -f json > {{data.csv}}`