xlsx-to-html-extractor
xlsx-to-html-extractor is a Python utility that converts Excel sheets to HTML files. It provides options to include formulas, grid labels, and cell titles.
Features
- Convert Excel sheets to HTML files.
- Option to include formulas in the HTML output.
- Option to add grid labels (row and column numbers).
- Option to add cell titles showing the cell addresses.
Installation
You can install the package using pip:
pip install xlsx-to-html-extractor``
Usage
Basic Usage
Here's a basic example of how to use the XlsxExtractor class:
from xlsx_to_html_extractor import XlsxExtractor
# Initialize the extractor
extractor = XlsxExtractor(
source_xlsx='data.xlsx',
dest_html_file='result.html',
show_formulas=False,
grid_labels=True,
cell_titles=True
)
# Extract the data and save to HTML
extractor.extract()`
Parameters
source_xlsx: Path to the source Excel file.dest_html_file: Path to the destination HTML file.show_formulas: Boolean flag to include formulas in the HTML output.grid_labels: Boolean flag to add grid labels (row and column numbers).cell_titles: Boolean flag to add cell titles showing the cell addresses.
Examples
Including Formulas
To include formulas in the HTML output, set show_formulas to True:
from xlsx_to_html_extractor import XlsxExtractor
extractor = XlsxExtractor(
source_xlsx='data.xlsx',
dest_html_file='result.html',
show_formulas=True,
grid_labels=True,
cell_titles=True
)
extractor.extract()
Adding Grid Labels
To add grid labels (row and column numbers), set grid_labels to True:
from xlsx_to_html_extractor import XlsxExtractor
extractor = XlsxExtractor(
source_xlsx='data.xlsx',
dest_html_file='result.html',
show_formulas=False,
grid_labels=True,
cell_titles=False
)
extractor.extract()
Adding Cell Titles
To add cell titles showing the cell addresses, set cell_titles to True:
from xlsx_to_html_extractor import XlsxExtractor
extractor = XlsxExtractor(
source_xlsx="data.xlsx",
dest_html_file="result.html",
show_formulas=False,
grid_labels=False,
cell_titles=True
)
extractor.extract()
License
This project is licensed under the MIT License.
Metadata
Release files for xlsx-to-html-extractor 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xlsx_to_html_extractor-0.1.0.tar.gz | 3.6 kB | Without provenance | Details for xlsx_to_html_extractor-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xlsx_to_html_extractor-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for xlsx_to_html_extractor-0.1.0-py3-none-any.whl |
Total release size: 7.7 kB
Release files / xlsx_to_html_extractor-0.1.0.tar.gz
| Download URL | xlsx_to_html_extractor-0.1.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a606d99fb6104073475a73fdab84f63e6eeaa0fad945217f90e51e366617b6f2
|
|
BLAKE2b-256 checksum How to use checksums |
dd7b051477c696fb55b5fa25910c33f66e8edebbd3647e5cefdc4f0d3fc2e18e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.8.18
|
Release files / xlsx_to_html_extractor-0.1.0-py3-none-any.whl
| Download URL | xlsx_to_html_extractor-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
07b801812d18db69654eb2a4ad3cd1d46a53cdd78f4e3d0c847f63918abbf087
|
|
BLAKE2b-256 checksum How to use checksums |
2242d8b5ef2d9c581d6f6cbdcec9ae5d8399fd09c91e61db9d49381cd0823fb0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.8.18
|
Security for xlsx-to-html-extractor 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.