Command-line interface for extracting data from Excel documents.
Project description
exex-cli
![Code style: black](https://pypi-camo.freetls.fastly.net/fbfdc7754183ecf079bc71ddeabaf88f6cbc5c00/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64652532307374796c652d626c61636b2d3030303030302e737667)
Command-line interface for extracting data from Excel documents.
Installation
pip install exex-cli
Usage
Synopsis
exex 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
python -m exex_cli sample.xlsx
Get all values as JSON
python -m exex_cli sample.xlsx --format json
Development
Tests (local Python version)
poetry run pytest
Tests (all Python versions defined in tox.ini
)
poetry run tox
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.
Source Distribution
exex-cli-0.1.1.tar.gz
(4.4 kB
view hashes)