Html-To-Xlsx. Rows/cells height issue



  • Good day. Could you please tell is it possible to make the table rows fit their content, if their cells do have different height?
    For example https://playground.jsreport.net/w/vladik-dev/d36vGARz

    It seems that their heights are calculated only once for each row, but for different cell each time...

    I also had troubles with rows being much larger than their content, but it was fixed using letter-spacing:-4px, however I haven't used the phantom.js, at least directly.



  • In your example if you remove overflow :Scroll from style it fits the cell content

    <style>
        td {
            background-color: yellow;
            color: green;
            border-style: solid;
        }
    </style>
    
    <table>
        <tr>
            <td style="font-size: 35px">Hello world</td>
            <td>world</td>
        </tr>
        <tr>
            <td style="width: 20px; text-align:right">right</td>
            <td>world</td>
        </tr>
        <tr>
            <td>world</td>
            <td>world</td>
        </tr>
    
        <tr>
            <td style="font-size: 35px">Hello world</td>
            <td>world</td>
        </tr>
        <tr>
            <td style="width: 20px; text-align:right">right</td>
            <td>world</td>
        </tr>
        <tr>
            <td>world</td>
            <td>world worldworldworldworld 
                worldworldworldworld<br/>worldworldworldworldworldworld
                worldworldworldworldworldworld
                worldworldworld</br/>
            </td>
        </tr>
        
    </table>
    


  • Correct, but without overlflow-scroll there will be no line breaks. Not acceptable anyway)


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.