views:

31

answers:

1

Hello,

I make a small web application that retrieve data and my clients copy information in the web page and paste data in excel

the problem is that copied data contains "html" elements about style or i don't know what and if users make a basic copy/paste it block macro in the excel document

If they copy data and paste in a notepad, re-copy and paste it will work, because, it remove unwanted data

searching on the internet, I found that, but it does not do what I want,

the idea is that when an user copy data the javascript "clean" the copied text and then no more issue

http://stackoverflow.com/questions/2793911/delete-text-from-copied-text

http://stackoverflow.com/questions/237254/how-do-you-handle-oncut-oncopy-and-onpaste-in-jquery

http://www.htmlgoodies.com/beyond/javascript/article.php/3458851/Click-Its-Copied.htm

A: 

You could put the text into the inner text of a <textarea> tag. Then, no formatting information will follow text when it's copied.

<textarea rows="4" cols="40">
  Text to be copied.
</textarea>
Abboq
thanks for your suggestion but I create a table (that I hope is nice) and the first goal of the data application is to give information to users