-4

I am hearing a ton of different info. I just found this in a site

The 'paste' operation in the context menu or button press is not possible. It is not possible because of a browser security restriction that Javascript cannot take data from the clipboard without the user explicitly doing a paste command from the browser (eg Ctrl+V or from the browser menu). If Javascript could do this, then websites could steal data from the client via grabbing from the clipboard maliciously.

If this is true then how does google do it? My team is asking why I cannot implement a copy from desktop excel and paste into a grid in our new web app. I cannot get a straight answer anywhere i look. This seemed like the closest but i wanted to make sure.

closed as unclear what you're asking by gnat, Robert Harvey, Laiv, Jörg W Mittag, amon Mar 26 '18 at 10:23

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • I think you are confusing an irrelevant security issue with a formatting issue. Can you paste from notepad? – candied_orange Mar 25 '18 at 22:54
3

Obviously, copy-paste in the browser is possible.

What the security mechanisms mean is that you cannot initiate it from the browser's javascript automatically. The user has to initiate it from their browser through their mechanism (probably by pressing CTRL-C or CTRL-V shortcuts).

My team is asking why I cannot implement a copy from desktop excel and paste into a grid in our new web app. I cannot get a straight answer anywhere i look.

Why not ask that question on Stackoverflow? Don't forget to include the code you tried and an exact description of where you are stuck and what errors you get if any.

Not the answer you're looking for? Browse other questions tagged or ask your own question.