Convert jinja2-html to xlsx
Project description
jinja2xlsx
Create xlsx-tables from html-tables
Example
Given html table str
When render html to xlsx
Then result xlsx has table values
from jinja2xlsx import render_xlsx
from openpyxl import Workbook
html_str = """<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Simple table</title>
</head>
<body>
<table>
<tbody>
<tr>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td>4</td>
</tr>
</tbody>
</table>
</body>
</html>"""
workbook: Workbook = render_xlsx(html_str)
assert tuple(workbook.active.values) == ((1, 2), (3, 4))
Publish to PyPI
poetry publish --build
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
jinja2xlsx-0.2.2.tar.gz
(5.9 kB
view hashes)
Built Distribution
jinja2xlsx-0.2.2-py3-none-any.whl
(18.2 kB
view hashes)
Close
Hashes for jinja2xlsx-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fbd77fe758f7d284ab999fcf62abfe1814d80209f0e2ae19e8280d005633d82 |
|
MD5 | 6d08e60a9df940a81e97f2681350dec4 |
|
BLAKE2b-256 | 71009befa23d18db5c1533e28d6cb66f1bd726f63ad72e4ff2e3a18e5d5d81cb |