Skip to main content

Convert HTML Table to Excel file

Project description

HTML2Excel Documentation

Library to convert HTML Tables to Excel file.

While libraries like pandas do read html files, they often don't work with merged cells and line breaks. This library was created with the sole intention of converting HTML tables to Excel files as they're seen while opening them with softwares such as MS Excel and LibreOffice.

A sample flask host code is provided in this link

Installation

pip install html2excel

Usage

Running from command line

python -m html2excel input_file output_file

Using as package

from html2excel import ExcelParser

input_file = '/tmp/text_file.html'
output_file = '/tmp/converted_file.xlsx'

parser = ExcelParser(input_file)
parser.to_excel(output_file)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

html2excel-0.0.6.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

html2excel-0.0.6-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file html2excel-0.0.6.tar.gz.

File metadata

  • Download URL: html2excel-0.0.6.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for html2excel-0.0.6.tar.gz
Algorithm Hash digest
SHA256 4686ade0fe37e4cc0cd274359114e3539802f92936f351dd405421c1ae796f0c
MD5 dfec1e3f121e5c3d1989ab9c3190af51
BLAKE2b-256 24bfc68f0b7639d72490bbdd4d22783a68d941fa13bcf0b26a799f7558556f76

See more details on using hashes here.

Provenance

File details

Details for the file html2excel-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: html2excel-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for html2excel-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e88f01e8a088c8d2009c0d88b8ea4b3db7c54e4c94f7d025c9d656901dd016d3
MD5 4acef6a7c06f220ddab9a06e78f3386c
BLAKE2b-256 afce62fdd980baf98e9cffab880bc880671dcb8c4ac061d3d30ed4dff3d3be4c

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page