Spread for ASP.NET 8.0 Product Documentation > Client-Side Scripting Reference > Scripting Members > Methods > PasteLikeExcel |
Pastes the Clipboard contents to the cells, starting with the active cell.
[JavaScript]
FpSpread1.PasteLikeExcel();
None
None
This method pastes the data. This method does not cause a postback to occur.
This is a sample that contains the method. On the client side, the script that contains the method would look like this:
JavaScript |
Copy Code
|
---|---|
<SCRIPT language=javascript>
function pasteData() {
FpSpread1.PasteLikeExcel();
}
</SCRIPT>
|
This example maps keys to the cut, copy, and paste functions:
JavaScript |
Copy Code
|
---|---|
<script type="text/javascript"> window.onload = function () { var spread = document.getElementById("FpSpread1"); spread.AddKeyMap(67, true, false, false, "CopyLikeExcel()"); // Ctrl + C spread.AddKeyMap(86, true, false, false, "PasteLikeExcel()"); // Ctrl + V spread.AddKeyMap(88, true, false, false, "CutLikeExcel()"); // Ctrl + X //or //spread.AddKeyMap(86, false, false, false, function () { var ss = spread; ss.PasteLikeExcel(); }); //v } </script> |