This release is a pre-release and may not be stable for production use.
sphinxcontrib-xlsxtable
A sphinx extension for making table from Excel file.
Depends on OpenPyXL
Supports xlsx file
Supports merged cell
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.
.. xlsx-table::
:file: path/to/xlsx/file.xlsx
:start-row: 2
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 |
+----+-------+-------+--------+
LICENSE
MIT
Metadata
Release files for sphinxcontrib-xlsxtable 0.1.10.dev20200411
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sphinxcontrib-xlsxtable-0.1.10.dev20200411.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sphinxcontrib_xlsxtable-0.1.10.dev20200411-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.1 kB
Release files / sphinxcontrib-xlsxtable-0.1.10.dev20200411.tar.gz
| Download URL | sphinxcontrib-xlsxtable-0.1.10.dev20200411.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aac1251516b2516aec19d319ff0a3c4cebb1c05749745191b8789519abe8f670
|
|
BLAKE2b-256 checksum How to use checksums |
4bbdfc8db74c1bb0db688f3f80999798d9860c207cc5a951f9179a1bd37c1de4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.4
|
Release files / sphinxcontrib_xlsxtable-0.1.10.dev20200411-py3-none-any.whl
| Download URL | sphinxcontrib_xlsxtable-0.1.10.dev20200411-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
68db77a06449f659e3fa6b8301880eb8231a19845af96ef790dc5a22ca320b96
|
|
BLAKE2b-256 checksum How to use checksums |
af5bf8367ec1ab105430be9328d829c93964a0b86f8d9d869849f1f3bccb2cfc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.4
|