Copy and Paste the html table with line breaks on excel not working -


so have textarea when type something, prints type on table.

the table generates same format when type texts line breaks in it. when highlight , copy table , paste on excel file, copied table line breaks consume cells in rows.

i want paste table same format table generates including line breaks.

anyone have idea how that?

i tried use paragraph tag no use, excel file paste white space.

here sample of script

<style>      td {         border: 2px solid black;     }     <br style="mso-data-placement:same-cell;"/>  </style>   <script> function myfunction(){      var mytextarea = document.getelementbyid("thetextarea");         document.getelementbyid("myprint").innerhtml =  mytextarea.value; } </script>       <textarea id="thetextarea" cols=20; rows=20; onkeyup="myfunction();"></textarea>      <table>     <td><pre id="myprint"></pre></td> <td>sample</td> <td>sampletwo</td>      </table> 


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -