I'm trying to access copied excel data via clipboard in JavaScript. I find the options to getData in the format of plain text or text/html.
If it has to be created as one associate array, is looping and parsing over the data as text/html or plain text the only option ?
Ex- the expected output object of the copied excel data shall be,
[{column1 : value1,column2:value 2},{}];
This is the code i'm using for accessing clipboard data
document.body.addEventListener("paste", function(e){
var clipboardData, oData;
e.stopPropagation();
e.preventDefault();
// Get pasted data via clipboard API
clipboardData = e.clipboardData || window.clipboardData;
oData = clipboardData.getData('text/html');
});