This release is a pre-release and may not be stable for production use.
csvx-py
Pre-alpha Python reference parser, canonical renderer, and XLSX converter for
the CSVX draft. The distribution name is csvx-py; the Python
package and command are both csvx.
Install from this repository
Install the published alpha package with:
python -m pip install "csvx-py"
For development from the repository:
cd tools/csvx-py
python -m pip install -e ".[dev]"
CLI
# Validate or canonicalize CSVX
csvx check workbook.csvx
csvx format workbook.csvx -o canonical.csvx
# Convert by file extension and retain a machine-readable loss report
csvx convert workbook.xlsx -o workbook.csvx --report import-report.json
csvx convert workbook.csvx -o rebuilt.xlsx --report export-report.json
XLSX import defaults to --dimension content: it preserves A1-relative
positions and interior gaps but trims trailing rows or columns that contain
only styles. Use --dimension worksheet to preserve the worksheet's reported
extent. --strict rejects any conversion that would report a loss.
Current fidelity boundary
The converter preserves sheet names, cell values, exposed formula text,
comments, hyperlinks ({{link: ...}}), positional blank gaps, and exposed
formula caches when importing. It never evaluates formulas. XLSX export asks
the spreadsheet application to recalculate formulas because cached results
cannot reliably be written with the current library.
Styles, merges, data validation, conditional formatting, charts, drawings, macros, and annotations other than links are not converted yet. Recognized unsupported features are aggregated in lenient-mode reports and rejected by strict mode. This pre-alpha converter does not yet detect every possible OOXML feature, so strict mode is not a complete fidelity guarantee.
Reviewed real-workbook conversion examples and their reports live in
tests/samples/. Run the package checks with:
python -m ruff check src tests
python -m pytest
Code is Apache-2.0; see the repository license.
Metadata
Release files for csvx-py 0.1.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| csvx_py-0.1.0a1.tar.gz | 15.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| csvx_py-0.1.0a1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.5 kB
Release files / csvx_py-0.1.0a1.tar.gz
| Download URL | csvx_py-0.1.0a1.tar.gz |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
896e438cf0bb48e4069bbbce50205a25a9238d7ba919913b614cd1a7f697ab91
|
|
BLAKE2b-256 checksum How to use checksums |
6da1b1ce149824b408e4ae4c384998a49cca5868431cbf60862ca142938769e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.13
|
Release files / csvx_py-0.1.0a1-py3-none-any.whl
| Download URL | csvx_py-0.1.0a1-py3-none-any.whl |
|---|---|
| Size | 16.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eac8dfc0338972f0ba537b06553e7ac0645e7c5a6cc59e35939dd79d64a488cc
|
|
BLAKE2b-256 checksum How to use checksums |
b939b90343c6c769156c78802db3482ed7fd568e1fb95472d846d6680202f0ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.13
|