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 [-h] [-i] [-P] [-w] [-H] [-c] [-N] [-r] [-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.
-sep SEPARATOR, --separator SEPARATOR
Define custom list separator in output, default is TAB
Example
$ xlsxgrep "myPATTERN" --with-filename --with-sheetname -sep=";" Document.xlsx
Document.xlsx: Sheet1: ;column1;column2;myPATTERN;pattern;column3;column4;column5;column6;column7
Installation
pip install xlsxgrep
Project details
Release history Release notifications | RSS feed
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.21.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for xlsxgrep-0.0.21-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 212716caa4b5c20be20680f7491f7496629ffbd3d5a527b7a022616e3ec899fd |
|
MD5 | 4abb0c9cd670e822ac5280245273ea6c |
|
BLAKE2b-256 | c66f82667bc4538867601fc2318b5a8dcf734940cde48ae22e3fd765c7482939 |