Annmayn / html2excel

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

Not desired results with vertically merged cells #4

Closed shobhitgegregore closed 3 years ago

shobhitgegregore commented 3 years ago

Merged cells feature is working fine with horizontally merged cells but not with vertical ones.

website source : https://www.cityunionbank.com/deposit-interest-rate

HTML TABLE

image

OUTPUT FROM THE SCRIPT

image

EXPECTED THIS

image

<table class="table">
    <tbody>
        <tr>
            <td colspan="4" rowspan="4"><strong>Period</strong></td>
        </tr>
        <tr>
            <td colspan="7"><strong>&nbsp;Rate of Interest % p.a</strong></td>
        </tr>
        <tr>
            <td><strong>General</strong></td>
            <td><strong>Senior Citizens</strong></td>
        </tr>
        <tr>
            <td colspan="7" style="text-align:center"><strong>Less than Rs.2 Crore</strong></td>
        </tr>
        <tr>
            <td colspan="4">7 days to 14 days</td>
            <td>3.00%</td>
            <td>3.00%</td>
        </tr>
        <tr>
            <td colspan="4">15 days to 45 days</td>
            <td>3.25%</td>
            <td>3.25%</td>
        </tr>
        <tr>
            <td colspan="4">46 days to 90 days</td>
            <td>3.50%</td>
            <td>3.50%</td>
        </tr>
        <tr>
            <td colspan="4">91 days to&nbsp;180 days</td>
            <td>3.75%</td>
            <td>3.75%</td>
        </tr>
        <tr>
            <td colspan="4">181 days to&nbsp;270 days</td>
            <td>4.00%</td>
            <td>4.00%</td>
        </tr>
        <tr>
            <td colspan="4">271 days to&nbsp;364 days</td>
            <td>5.00%</td>
            <td>5.00%</td>
        </tr>
        <tr>
            <td colspan="4">365 days to 550 days</td>
            <td>5.50%</td>
            <td>6.00%</td>
        </tr>
        <!--<tr>
            <td colspan="4">1000 days <sup>@</sup></td>
            <td align="center" colspan="2">7.50%</td>
        </tr>-->
        <tr>
            <td colspan="4">551 days to 3 years</td>
            <td>5.75%</td>
            <td>6.25%</td>
        </tr>
        <tr>
            <td colspan="4">Above 3 years and up to 5 years</td>
            <td>5.50%</td>
            <td>6.00%</td>
        </tr>
        <tr>
            <td colspan="4">Above 5 years and upto 10 years</td>
            <td>5.25%</td>
            <td>5.25%</td>
        </tr>
        <tr>
            <td colspan="12">Tax Saver Schemes (both for General category and Senior Citizens) ROI p.a&nbsp; 6.00%</td>
        </tr>
        <tr><!--<td colspan="12">Savings A/C: Rate of interest will be 4.00% P.a</td>-->
        </tr>
    </tbody>
</table>