A sphinx extension for making table from Excel file
Project description
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
: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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for sphinxcontrib-xlsxtable-0.1.10.dev20200411.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | aac1251516b2516aec19d319ff0a3c4cebb1c05749745191b8789519abe8f670 |
|
MD5 | 5433ff3c6d5ab175bd1e028d96675c3c |
|
BLAKE2b-256 | 4bbdfc8db74c1bb0db688f3f80999798d9860c207cc5a951f9179a1bd37c1de4 |
Close
Hashes for sphinxcontrib_xlsxtable-0.1.10.dev20200411-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68db77a06449f659e3fa6b8301880eb8231a19845af96ef790dc5a22ca320b96 |
|
MD5 | 4009500ab190cc2e00ce92f27f2fec55 |
|
BLAKE2b-256 | af5bf8367ec1ab105430be9328d829c93964a0b86f8d9d869849f1f3bccb2cfc |