Annmayn / html2excel

Convert HTML tables to excel files
https://pypi.org/project/html2excel/
MIT License
12 stars 3 forks source link

Problems with rowspans #7

Open fedor-ivn opened 3 years ago

fedor-ivn commented 3 years ago

Hello! I've been using this package and stuck with the bug.

I have a table like that in HTML -> example But when I export it to excel with ExcelParser, I have some extra rows in the excel table. Take a look at the screenshot, I drew them in red.

table

The code I used to generate the .xslx file

from html2excel import ExcelParser
parser = ExcelParser('./test.html')
parser.to_excel('./converted_file.xlsx')
Annmayn commented 3 years ago

I'm not sure how browsers parse html files but they do seem to adjust even if our html tables are erroneous. Taking that approach here would be disingenuous as the goal of this library is to create an exact replica of how it would look on excel.