Skip to main content

Command-line interface for extracting data from Excel documents.

Project description

exex-cli

CLI for extracting data from Excel documents

PyPI version test codecov


Installation

pip install exex-cli

Usage

Synopsis

python -m exex_cli extract FILENAME --sheet SHEET --range RANGE --format FORMAT 
Parameter Type Default Description
FILENAME (required) string Path to .xlsx file.
[SHEET] (optional) string or int 0 (first sheet) Name or index of sheet
[RANGE] (optional) range all (all values) Range to get values from
[FORMAT] (optional) string text text, table, json, csv

Type of ranges

Type Syntax Example
All values all all
Cell by name [COLUMN_NAME][ROW_NUMBER] A1
Cell by index [COLUMN_INDEX],[ROW_INDEX] 1,1
Cell range [FROM]:[TO] A1:A3
Column [COLUMN_NAME] A
Column range [FROM]:[TO] A:C
Row [ROW_NUMBER] 1
Row range [FROM]:[TO] 1:3

Examples

Get all values as JSON

python -m exex_cli extract sample.xlsx --format json

Get cell range as CSV

python -m exex_cli extract sample.xlsx --range A1:A3 --format csv

Development

Setup

poetry install

Tests (local Python version)

poetry run pytest

Code formatting (black)

poetry run black .

Project details


Download files

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

Files for exex-cli, version 1.0.3
Filename, size File type Python version Upload date Hashes
Filename, size exex_cli-1.0.3-py3-none-any.whl (5.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size exex-cli-1.0.3.tar.gz (4.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page