auto fit for excel columns while exporting from data table using tabletools

auto fit for excel columns while exporting from data table using tabletools

vivekchovivekcho Posts: 5Questions: 3Answers: 0

I m using table tools in data table for exporting of table contents to excel file, but can we set column width of excel file to auto????
Can this be done using table tools???

Answers

  • vivekchovivekcho Posts: 5Questions: 3Answers: 0

    my code for data table is

    $(document).ready(function(){
    
    
        var t = $('#contractList').dataTable( {
            "sDom": 'T<"clear">lfrtip',
            "oTableTools":
    
        {
    
                "sSwfPath": "${resource(dir: 'swf', file: 'copy_csv_xls_pdf.swf')}",
                "aButtons": [
                    {
                        "sExtends":"xls",
                        "mColumns":[0,1,2,3,4]
    
                    },
                    {
                        "sExtends": "print",
                        "sMessage": "Contract List Enlistment"
                    }
                ]
            }
    
        }); 
    }) 
    

    Now i need to format the excel file with column width auto according to content, can anybody help me???

This discussion has been closed.