Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/potykion/jinja2xlsx
Create xlsx-tables from html-tables
https://github.com/potykion/jinja2xlsx
html jinja2 openpyxl python xlsx
Last synced: 2 months ago
JSON representation
Create xlsx-tables from html-tables
- Host: GitHub
- URL: https://github.com/potykion/jinja2xlsx
- Owner: potykion
- Created: 2019-03-24T10:16:43.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-23T13:24:54.000Z (almost 2 years ago)
- Last Synced: 2024-11-06T06:49:55.736Z (2 months ago)
- Topics: html, jinja2, openpyxl, python, xlsx
- Language: Python
- Homepage: https://pypi.org/project/jinja2xlsx/
- Size: 123 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# jinja2xlsx
Create xlsx-tables from html-tables
## Example
Given html table str
When render html to xlsx
Then result xlsx has table values
```python
from jinja2xlsx import render_xlsx
from openpyxl import Workbookhtml_str = """
Simple table
1
2
3
4
"""workbook: Workbook = render_xlsx(html_str)
assert tuple(workbook.active.values) == ((1, 2), (3, 4))
```## Installation
```
pip install jinja2xlsx
```For images support:
```
pip install jinja2xlsx[pil]
```## Development
Install dependencies:
```
poetry install
```For images support:
```
poetry install -E pil
```Run tests and linting:
```
pre-commit run -a
```Install pre-commit hooks:
```
pre-commit install
```## Extra
### Publish to PyPI
```shell
poetry publish --build
```