Skip to main content

Owerview

xlsxgrep is a CLI tool to search text in XLSX, XLS, XLSM, CSV, TSV and ODS files. It works similarly to Unix/GNU Linux grep.

Features

  • Grep compatible: xlsxgrep tries to be compatible with Unix/Linux grep, where it makes sense. Some of grep options are supported (such as -r, -i or -c).

  • Search many XLSX, XLS, XLSM, CSV, TSV and ODS files at once, even recursively in directories.

  • Parallel execution: multi-process search via -j / --jobs, using all available CPU cores by default.

  • Format-aware spreadsheet output: XLSX/XLSM and XLS numeric cells are rendered using their spreadsheet number format. ODS cells use their stored display text. CSV and TSV values are printed exactly as stored in the source file.

  • Regular expressions: Python regex and POSIX extended regular expressions (-E).

  • Search modes: row mode (-R / --row, default) prints matching rows; column mode (-C / --column) prints matching columns vertically. Count mode (-c) reports matching rows, columns, cells, and strings.

  • Usable as a module: import xlsxgrep into Python code to run searches programmatically and get structured results.

  • Works on all major platforms: Windows, macOS, BSD and Linux.

Usage:


usage: xlsxgrep [-h] [-V] [-P] [-E] [-F] [-i] [-w] [-c] [-r] [-H] [-N]
                [-l] [-L] [-S SEPARATOR] [-Z] [-j JOBS] [-p] [-R | -C] 
                [-d] PATTTERN FILE [FILE ...]

positional arguments:
  PATTERN                    use PATTERN as the pattern to search for.
  FILE                       file or path to folder

options:
  -h, --help                 show this help message and exit.
  -V, --version              display version information and exit.
  -P, --python-regex         PATTERN is a Python regular expression.
  -E, --extended-regexp      PATTERN is a POSIX extended regular expression (Default).
  -F, --fixed-strings        interpret PATTERN as fixed strings, not regular expressions.
  -i, --ignore-case          ignore case distinctions.
  -w, --word-regexp          force PATTERN to match only whole words.
  -c, --count                print only a count of matches per file.
  -r, --recursive            search directories recursively.
  -H, --with-filename        print the file name for each match.
  -N, --with-sheetname       print the sheet name for each match.
  -l, --files-with-match     print only names of FILEs with match pattern.
  -L, --files-without-match  print only names of FILEs with no match pattern.
  -S, --separator SEPARATOR  define custom list separator for output, the default is TAB.
  -j, --jobs JOBS            number of CPU cores to use for search (default: all cores).
  -p, --progress             display a progress bar during the search.
  -R, --row                  search rows and print matching rows (default).
  -C, --column               search columns and print whole matching columns vertically.

Examples:

xlsxgrep -i "foo" foobar.xlsx
xlsxgrep -c -H "(?i)foo|bar" /folder

For more details and options, see xlsxgrep(1) or run 'man xlsxgrep'.


Installation

pip install xlsxgrep

Or download a standalone installer or portable binary for Windows, macOS, or Linux (.deb/.rpm/.pkg.tar.zst) from the releases page.

Release files for xlsxgrep 0.0.39

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xlsxgrep 0.0.39
File Size Uploaded
xlsxgrep-0.0.39.tar.gz 15.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xlsxgrep 0.0.39
File Interpreter ABI Platform
xlsxgrep-0.0.39-py3-none-any.whl Python 3 none any Details

Total release size: 29.5 kB

Release files / xlsxgrep-0.0.39.tar.gz

Download URL xlsxgrep-0.0.39.tar.gz
Size 15.1 kB
Tags Source
SHA-256 checksum
How to use checksums
330174e0a41640a65c6942fcae9e94d0c10a12fc4fe064936a48070ea6c8fb7d
BLAKE2b-256 checksum
How to use checksums
942d33d841bfd46cb28dbcc5dd1f0f5e0eba53f032a7c2f133f5291b0b863f07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / xlsxgrep-0.0.39-py3-none-any.whl

Download URL xlsxgrep-0.0.39-py3-none-any.whl
Size 14.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
109190812fd391c0d5df71d8e6c28b04461a63851304cf0ab1c0b734115e1c61
BLAKE2b-256 checksum
How to use checksums
f10836dec926273eff5cbf788a8461bc5f065b781febcfaf67576116f3cf0a97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

0.0.41

2 release files

This release

0.0.39 This release

2 release files

0.0.34

2 release files

0.0.33

2 release files

0.0.32

2 release files

0.0.31

2 release files

0.0.30

1 release file

0.0.29

2 release files

0.0.28

2 release files

0.0.27

2 release files

0.0.26

2 release files

0.0.25

2 release files

0.0.24

1 release file

0.0.23

2 release files

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page