Skip to main content

CLI utility to search text in XLSX and XLS files. It works similary to grep

Project description

Owerview

xlsxgrep is a tool to search text in XLSX and XLS files. It works similary to grep or pdfgrep.

This is a very early development version. While it technically works, much work needs to be done to better organize the code and implement additional features. See "To-do" below.

Features

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

  • Search many XLSX and XLS files at once, even recursively in directories.

  • Regular expressions: Python regex.

Usage:

usage: xlsxgrep [-h] [-i] [-P] [-w] [-H] [-c] [-N] [-r] pattern path [path ...]

positional arguments: pattern Use PATTERN as the pattern to search for. path File or folder location

optional arguments: -h, --help Show this help message and exit -i, --ignore-case Ignore case distinctions. -P, --python-regex PATTERN is a Python regular expression -w, --word-regexp Force PATTERN to match only whole words -H, --with-filename Print the file name for each match. -c, --count Print only a count of matches per file -N, --with-sheetname Print the sheet name for each match. -r, --recursive Search directories recursively.

Example

     $ xlsxgrep --with-filename --with-sheetname pattern Document.xlsx
   Document.xlsx: Sheet1: Line that match your pattern.

TODO

  • Rewrite the whole thing from the scratch. :-D
  • Extend with additional options.
  • Add colors to output.
  • Replace lxrd library with pandas.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

xlsxgrep-0.0.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xlsxgrep-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for xlsxgrep-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c20033f1651ca610264a672a9780c268540578626a45eedc86fd1bcd3ff226bd
MD5 0268ea98dc06045f2062af2e8edab682
BLAKE2b-256 3acba21d92d9943345ad3e281df88357cc72d05a7b9eac07a3eaf573d76ac36d

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