javascript - Jquery - copy excel data into input fields -
i trying copy excel columns 1 input field break each excel cell own input field. have working not excel data.
for example, if copy , paste '1 2 3 4 5' 1 input field, take each value , paste separate input field.
example: !http://imgur.com/1uzt1k1
if copy , paste data example below, not work:
check out jsfiddle example https://jsfiddle.net/jdarville/rfsn1sz4/
$("#templateinfo").bind("paste", function(e){ // access clipboard using api var pasteddata = e.originalevent.clipboarddata.getdata('text'); arr = pasteddata.split(' '); for(i=0; < arr.length; i++){ $("#temp"+i).val(arr[i]); } } );
its splitting data ' ' , if copy , paste excel data has space between information not working.
Comments
Post a Comment