sphinx-excel 
introduction
sphinx-excel uses openpyxl to read an excel file and render it into sphinx document.
installation
you can install sphinx-excel by pip.
python3 -m pip install sphinx-excel
setup
please add sphinxcontrib.excel into your conf.py file.
extensions = [
'sphinxcontrib.excel',
]
usage
the following code will insert the first sheet of tables.xlsx into sphinx document.
.. excel:: ./tables.xlsx
the excel directive will show the sheet name as the caption of table. you can use :no-caption to remove it.
.. excel:: ./tables.xlsx
:no-caption:
if you want to specify the caption, you can use :caption: argument.
.. excel:: ./tables.xlsx
:caption: hello world
excel directive supports all arguments of sphinx native table directive. for example, you can use :align: to change table align style.
.. excel:: ./tables.xlsx
:align: center
if an excel file contains more than one sheets, you can use :sheet: arguments to specify which sheet to be rendered.
.. excel:: ./tables.xlsx
:align: center
:sheet: stuff
the first line of table is in bold font, it means that the first line is header of table. if the table has two rows header, you can use :headers: to tell excel directive.
.. excel:: ./tables.xlsx
:headers: 2
one more thing
excel directive supports to render merged cell in excel. the content of the cell can be:
- math equtions,
- code snippets, and
- other directives.
Release files for sphinx-excel 1.0.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 | |
|---|---|---|---|
| sphinx-excel-1.0.1.tar.gz | 5.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sphinx_excel-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.3 kB
Release files / sphinx-excel-1.0.1.tar.gz
| Download URL | sphinx-excel-1.0.1.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef0bdb324399f17c0cf55704621ff7f7b976c1bac648d9820de9a28b605d5e59
|
|
BLAKE2b-256 checksum How to use checksums |
1c8b0a560a3d023081e9dff76ea25edd4ec170fd5b366d22641523a378a565d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.0 importlib-metadata/5.0.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.6
|
Release files / sphinx_excel-1.0.1-py3-none-any.whl
| Download URL | sphinx_excel-1.0.1-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5e4865ec1fd54ff8ba3244e1912d2cc9868cdeb2cbe6d564297e13720fd5b931
|
|
BLAKE2b-256 checksum How to use checksums |
1ba8d2df2303bb85e819a4108f5941cc8ad5b7c631e56664d95775ea2eec340a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.0 importlib-metadata/5.0.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.6
|