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

xlsxgrep-0.0.1-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

Supported by

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