<script>
    $(document).ready(function () {
            var table = $('#variant').DataTable({
                "scrollX": true,
                "autoWidth": false,
                dom: 'Bfrtip',
                buttons: ['excel']
            });
            table.draw();
    });
</script>