How to get data from the clipboard when copying cells in Excel?

Here's the situation. Let's say, copy the 2 selected cells in Excel (one name, different number). If in Excel, click insert, then he realizes that it's 2 different cells and inserts them into 2 cells.
Is it possible to implement a button on the page, where the 2 input's and the data will be inserted separately (1 input the first cell, 2 for the second)? Where to find this data via JS?
April 19th 20 at 12:16
2 answers
April 19th 20 at 12:18
within one page (one JS script) you don't have to restart, likely something spinning

document.addEventListener('copy', (e) => {
 // here you can catch ctrl+c 
 // and for example write the value in variable inputof / storadzh
});

document.addEventListener('paste', (e) => {
 // and then ctrl+v
});


UPD
when copying, you can overwrite the buffer
document.addEventListener('copy', function(e){
 e.clipboardData.setData('text/plain', 'you don't copy');
 e.preventDefault(); 
});

here the idea is here to put a string in your format, and then we can copy here and there within the site/web app, even restarting the browser
https://caniuse.com/#feat=clipboard
don't quite understand:
1) go to the Excel program with the table. There is something written
2) allocate 2 cells and copy
3) I went to the page browser. There I have a button and 2 input
4) press the button and inutah appear data from cells. 1 first, 2 of second.
But as I have read, you understand, that on the contrary.

I tried using
navigator.clipboard.readText()

But there is a line of cells sanctinaumi not understand it. Roofing special roofing symbol of how multiple spaces - Claudi commented on April 19th 20 at 12:21
April 19th 20 at 12:20
Copy these two cells and paste in a simple text editor (e.g. Notepad). And you will see that the text will be in the form of two strings separated by tab \t. Accordingly, when inserting the copied on your page can be broken to insert the tab character, and dragged out of the line to the desired input-s...
It's elementary, Watson!

Find more questions by tags ExcelJavaScript