You can work with Excel files from a Linux terminal, but the right tool depends on the job. csvkit and xlsx2csv turn workbook data into CSV for shell workflows; Excelkit is documented as a command-line tool for operating on Excel files; openpyxl lets Python scripts read and write workbooks; and xls2xlsx converts legacy .xls files to .xlsx. These tools are not interchangeable, and converting a workbook to CSV is not the same as editing and saving the workbook.
Choose by the result you need
Start with the output format and operation, not just the fact that the input is an Excel file. If you need rows and columns for shell processing, convert the workbook data to CSV. If you need a script to read or write an Excel workbook, use a library such as openpyxl. If you need to operate on an Excel file through a CLI, Excelkit is one candidate, but check its current documentation for supported operations.
| Tool | What it does | Input and output established by the documentation | Best fit |
|---|---|---|---|
| csvkit | Converts and works with tabular data using several command-line utilities. | .xls and .xlsx to CSV |
Convert workbook data, inspect or select CSV columns, and query tabular data. |
| xlsx2csv | Extracts XLSX workbook data as CSV. | XLSX to CSV | Convert a workbook or selected sheet for downstream shell processing. |
| Excelkit | A command-line tool for operating on Excel files, based on openpyxl. | Specific supported formats and outputs are not stated in the available documentation. | Investigate when you want an Excel-oriented CLI; verify its current feature list first. |
| openpyxl | A Python library for reading and writing Excel workbooks. | Excel 2010 OOXML formats, including .xlsx and .xlsm |
Build terminal-run Python scripts that read or write workbook content. |
| xls2xlsx | Provides a command-line conversion from legacy Excel files. | .xls to .xlsx |
Convert a legacy-format file to the newer workbook extension; check requirements and fidelity for your use case. |
Convert workbook data to CSV for shell work
csvkit: conversion plus tabular-data utilities
csvkit is a suite rather than a single converter. Its in2csv utility converts .xls and .xlsx files to CSV. You can inspect the resulting text in a terminal or redirect it into a file for later processing. The suite also includes csvlook for viewing tabular data, csvcut for selecting columns, and csvsql for SQL-style queries. See the csvkit documentation and its tutorial for current usage details.
CSV is a plain-text representation of tabular data, not a full Excel workbook. A conversion workflow is useful when your next step is filtering, inspecting, or querying rows from the shell; it does not preserve the workbook as an editable Excel file with its sheets and other workbook features.
xlsx2csv: focused XLSX extraction
xlsx2csv focuses on converting XLSX workbook data to CSV. Debian’s testing manual documents reading input from standard input, selecting a sheet, choosing delimiters and date formats, and recursive conversion. Those options can help fit the CSV output to a later shell workflow. Consult the Debian testing manual for the supported options in that package documentation.
Like any workbook-to-CSV conversion, this produces delimited text rather than an Excel workbook. If the required deliverable must remain a workbook, use a workbook-oriented approach instead.
Rank #2
Work with an Excel file through a CLI
Excelkit: check the feature list before relying on it
Excelkit’s documentation describes it as a command-line tool for operating on Excel files and says it is based on openpyxl. The available documentation does not establish its detailed commands or supported formats, so do not assume it can perform a particular edit or preserve a particular file feature. Check the project’s documentation for its current installation instructions and capabilities before choosing it.
Read and write workbooks in terminal-run Python
openpyxl: a library, not an interactive spreadsheet CLI
openpyxl is a Python library for reading and writing Excel 2010 OOXML workbook formats, including .xlsx and .xlsm. You can use it in a Python script that you run from a terminal, but it is not itself an interactive command-line spreadsheet program. Its documentation identifies version 3.1.3 and was generated on May 29, 2024; consult the current project documentation for up-to-date details.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →The openpyxl documentation warns that protection against quadratic blowup and billion-laughs XML attacks is not enabled by default and recommends installing defusedxml for protection. This matters when your script processes workbooks from sources you do not trust; see the project’s security notes and dependency guidance.
Convert legacy XLS files to XLSX
xls2xlsx: a format-conversion path
xls2xlsx documents a command-line conversion from legacy .xls files to .xlsx. The documentation establishes that conversion path, but not how faithfully formatting or other workbook features are preserved, nor specific Linux installation steps. Check the project documentation for current details, and validate the resulting workbook if its contents or presentation matter.
Rank #4
Check format and installation before committing
Installation commands and package availability can vary by project version and Linux distribution. The csvkit documentation identifies version 2.2.0, while the xlsx2csv manual cited here is for Debian testing; package names and options can change. Check the current project documentation and your distribution’s package information before installing or scripting against a specific version.
Quick Recap
Best Value
- Choose csvkit or xlsx2csv when a CSV output is acceptable and you want to process tabular data in the shell.
- Choose openpyxl when your Python script needs to read or write supported Excel workbooks.
- Evaluate Excelkit if you want an Excel-oriented CLI, but confirm the exact commands and formats it supports.
- Consider xls2xlsx when the required operation is converting a legacy
.xlsfile to.xlsx; check the output for features important to your use case.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Free tools Windows power users keep installed
One-click scans. No signup required.




