Skip to main content

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

Project description

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.

  • Regular expressions: Python regex.

  • Supported file types: csv, ods, tsv, xls, xlsx, xlsm.

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

Usage:


usage: xlsxgrep [-h] [-V] [-P] [-F] [-i] [-w] [-c] [-r] [-H] [-N] [-l] [-L] [-S SEPARATOR]
                [-Z] [-d] PATTERN FILE [FILE ...]

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

optional arguments:
  -h, --help	            show this help message and exit.
  -V, --version	            display version information and exit.
  -P, --python-regex        PATTERN is a Python regular expression. This is the 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 SEPARATOR define custom list separator for output, the 
                            default is TAB.
  -Z, --null                output a zero byte (the ASCII NUL character) instead of the
                            usual newline.

Examples:

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

Installation

pip install xlsxgrep

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xlsxgrep-0.0.32.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xlsxgrep-0.0.32-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file xlsxgrep-0.0.32.tar.gz.

File metadata

  • Download URL: xlsxgrep-0.0.32.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for xlsxgrep-0.0.32.tar.gz
Algorithm Hash digest
SHA256 e85e8cb36b5ca00d4224596baa8686a9011bdc4e1779ff88003e9c1c57f5753b
MD5 2a3645ce0c4b639299f5d3440788534a
BLAKE2b-256 b39d6b0fc5773df8aeebf980de27d988f9fe2c75248b4d518b1d1afe6bff4174

See more details on using hashes here.

File details

Details for the file xlsxgrep-0.0.32-py3-none-any.whl.

File metadata

  • Download URL: xlsxgrep-0.0.32-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for xlsxgrep-0.0.32-py3-none-any.whl
Algorithm Hash digest
SHA256 5397810c84ee311caf63e65a5e9692a35fba52bfe337de76b6ee5e34fe74b424
MD5 7ce30677452984cd39e02ea762aaf0c7
BLAKE2b-256 81d8b9e21838a7304410c1375d03f2e2b1f8863a02b396380b87ff5b64ee6d53

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page