sphinxcontrib-xlsxtable
A sphinx extension for making table from Excel file.
Depends on OpenPyXL
Supports xlsx file
Supports merged cell
Supports images
Supports Japanese
This extension generates a grid table string internally from Excel file.
Install and Set up
Install from PyPI.
$ pip install sphinxcontrib-xlsxtable
Configure conf.py
# conf.py
extensions = [
'sphinxcontrib.xlsxtable',
]
Usage
reStructuredText directive:
.. xlsx-table:: Table Caption
:file: path/to/xlsx/file.xlsx
:header-rows: 1
Excel file:
Rendered HTML:
Options
Caption (optional)
Specifies table caption string.
.. xlsx-table:: Table Caption
:file: path/to/xlsx/file.xlsx
:file: (required)
Specifies path to Excel file. You can use relative path.
.. xlsx-table::
:file: path/to/xlsx/file.xlsx
:header-rows: (optional)
Specified the number of lines are used as header.
.. xlsx-table::
:file: path/to/xlsx/file.xlsx
:header-rows: 1
:sheet: (optional)
Generates a table from a sheet with the specified sheet name.
If this option is not specified, current active sheet is used.
.. xlsx-table::
:file: path/to/xlsx/file.xlsx
:sheet: Sheet1
:start-row: (optional)
Specifies start row number.
.. xlsx-table::
:file: path/to/xlsx/file.xlsx
:start-row: 2
:start-column: (optional)
Specifies start column number.
.. xlsx-table::
:file: path/to/xlsx/file.xlsx
:start-column: 2
:include-rows: / :exclude-rows: (optional)
Specifies include or exclude rows. Exclude setting has priority.
.. xlsx-table::
:file: path/to/xlsx/file.xlsx
:include-rows: 1-2 4 8
:exclude-rows: 3 5-7
:include-columns: / :exclude-columns: (optional)
Specifies include or exclude columns. Exclude setting has priority.
.. xlsx-table::
:file: path/to/xlsx/file.xlsx
:include-columns: A-B 4
:exclude-columns: C 5-6
CLI
You can use from CLI.
$ python -m sphinxcontrib.xlsxtable --sheet=Sheet1 --header-rows=1 test/_res/sample.xlsx
+----+-------+-------+--------+
| A1 | B1 | C1 | D1 |
+====+=======+=======+========+
| A2 | B2:B3 | C2 | D2 |
+----+ +-------+--------+
| A3 | | C3:D3 |
+----+-------+-------+--------+
| A4 | B4 | C4 | - D4-1 |
| | | | - D4-2 |
+----+-------+-------+--------+
Links
LICENSE
MIT
Metadata
Release files for sphinxcontrib-xlsxtable 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sphinxcontrib-xlsxtable-1.1.1.tar.gz | 12.2 kB | Without provenance | Details for sphinxcontrib-xlsxtable-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sphinxcontrib_xlsxtable-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for sphinxcontrib_xlsxtable-1.1.1-py3-none-any.whl |
Total release size: 23.3 kB
Release files / sphinxcontrib-xlsxtable-1.1.1.tar.gz
| Download URL | sphinxcontrib-xlsxtable-1.1.1.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
316f3021c40b4088e295722808ae7e6f4c0edb2fa3d515f85b01d31e6bcf7f90
|
|
BLAKE2b-256 checksum How to use checksums |
6c4f481916f5becab113a37d7b3dfb1ee07a6c9c6d448621e467d8fde1c592c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.6
|
Release files / sphinxcontrib_xlsxtable-1.1.1-py3-none-any.whl
| Download URL | sphinxcontrib_xlsxtable-1.1.1-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
83f36b1305f6a302efce5b70f6fb9460856b07b30ca5a5cb62557be51eb45519
|
|
BLAKE2b-256 checksum How to use checksums |
350550a86ea2017a69b10c31c3a7e8fcf8ed36df0a4d147bbbc26a658d56e539
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.6
|
Security for sphinxcontrib-xlsxtable 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.