Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82543

DataTables Buttons excelHTML5 vertical cell alignment

$
0
0

Hello,
I am using the Buttons excelHTML5 export with a table which contains one column with a large amount of text. I was able to implement the customize function to wraptext. Unfortunately all of the cells by default are bottom aligned, which makes the table difficult to read due to the row height being increased to accommodate the wrapped column with a large amount of text. Is there a way to specify that the cell content should be top aligned?

$('#myTable').DataTable( {
    buttons: [
        {
            extend: 'excelHtml5',
            text: 'Save as Excel',
            customize: function( xlsx ) {
                var sheet = xlsx.xl.worksheets['sheet1.xml'];
                $('row:first c', sheet).attr( 's', '55' );  //<-- wrapped text
            }
        }
    ]
} );

Thank you in advance for your help!


Viewing all articles
Browse latest Browse all 82543

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>