Skip to main content

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

Project description

Owerview

xlsxgrep is a command-line tool to search text in XLSX and XLS files. It works similary to Unix/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 and XLS files at once, even recursively in directories.

  • Regular expressions: Python regex.

Usage:

usage: xlsxgrep.py [-h] [-i] [-P] [-w] [-H] [-c] [-N] [-r] [-V]
                   [-sep SEPARATOR]
                   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.
  -V, --version         Display version information and exit.
  -sep SEPARATOR, --separator SEPARATOR
                        Define custom list separator for output, default is
                        TAB

Example

     $ xlsxgrep "myPATTERN" --with-filename --with-sheetname -sep=";" Document.xlsx
   Document.xlsx: Sheet1:   ;column1;column2;myPATTERN;column3;column4;column5;column6 

Installation

 pip install xlsxgrep

Project details


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.22.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

xlsxgrep-0.0.22-py3-none-any.whl (5.0 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