Thursday 22 March 2018

Rotate text in ms excel from HTML table using style inside table

///////////////////////////
style-

<style>
mso-rotate: 40; /where 40 is degree/
</style>



<table >
        <thead>
            <tr>
                <th colspan="2" rowspan="2" style="background-color: aqua; mso-rotate: 40;">
                    Column 0
                </th>
                <th rowspan="2" style="mso-rotate: 90;">
                    Column 1
                </th>
                <th colspan="2">
                    Column 2
                </th>
            </tr>
            <tr>
                <th>
                    Column 2a
                </th>
                <th>
                    Column 2b
                </th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <th rowspan="2">
                    Row 1
                </th>
                <th style="mso-rotate: 60;">
                    Row 1a
                </th>
                <td>
                    123
                </td>
                <td>
                    456
                </td>
                <td>
                    789
                </td>
            </tr>
            <tr>
                <th>
                    Row 1b
                </th>
                <td class="rotate" style="mso-rotate: 90;">
                    123
                </td>
                <td>
                    456
                </td>
                <td>
                    789
                </td>
            </tr>
            <tr>
                <th colspan="2" style="mso-rotate: -90;">
                    Row 2
                </th>
                <td>
                    123
                </td>
                <td>
                    456
                </td>
                <td>
                    789
                </td>
            </tr>
        </tbody>
    </table>


No comments:

Post a Comment

Excel Sort values in ascending order using function TEXTJOIN

 Excel ::  Text ::  1,3,5,2,9,5,11 Result :: 1,2,3,5,5,9,11 Formula ::     TEXTJOIN ( ",",1,SORT(MID(SUBSTITUTE( A1 ,","...