Pasting from excel to multiple input fields

Pasting from excel to multiple input fields

Using the following script when pasting rows of data from excel to multiple input fields on a form. It almost works except that it only copies the last value to all the fields. How can I rework the code to copy each column to the appropriate input.

$('input').bind('paste', null, function(e){
    $this = $(this);

    setTimeout(function(){
        var columns = $this.val().split(/\s+/);
        
        var i;

        for(i=0; i < columns.length; i++){
            $('input').val(columns[i]);
        }
    }, 0);
});