onBeforePaste

fires before data pasting

boolean onBeforePaste(object start,object end,array data,boolean fromSheet,object context);
start
objectan object with the start cell of the selected area (target of paste) set as {row:id, column:id} end
objectan object with the end cell of the selected area (target of paste) set as {row:id, column:id} data
arrayan array of cells with data that were copied (a 2D (two-dimensional) array of rows with cells) fromSheetbooleansignals if the copied data are from the same sheet where they are pasted into contextobjecta context object of the copy operation which has page (the origin of the copied data) and view (the instance of spreadsheet, also the origin of the data)
booleanreturning false will prevent pasting of copied data

Example

$$("ssheet1").attachEvent("onBeforePaste",function(start,end,data,fromSheet,context){
    // handler code here
    return true;
});

Details

Each cell in the data array parameter includes:

Back to top
Join Our Forum
We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.