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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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