DataTable与span值有关

I am doing export functions using DataTable for a report. I have created the example here: https://jsfiddle.net/hn2gcken/140/ I have user input value in W2, which also updates the value of 4Tax. I have created a hidden span tag to get those values when I insert. But the values are still not showing in the excel/PDF format.

Jquery

 var table = $('#example').DataTable( {
            lengthChange: false,
            dom: 'Bfrtip',
            "bPaginate": false,
            "paging":   false,
            "ordering": false,
            "info":     false,
            "searching": false,
            buttons: [  'excel', 'pdf']
        } );

        table.buttons().container()
            .appendTo( $('div.eight.column:eq(0)', table.table().container()) );

          $("#w2").keyup(function () {
        if (!isNaN(this.value) && this.value.length != 0)
        {
            $("#w2-span").text($(this).val());
            $("#4tax-span").text($(this).val());
            $("#4tax").val($(this).val());
             $("#w2").attr('value', $(this).val())
        }
    });

I would be very grateful if anyone could help me. Thanks!