activeSheet.setValue(0, 0, 1, GcSpread.Sheets.SheetArea.viewport);
activeSheet.setValue(1, 0, 2, GcSpread.Sheets.SheetArea.viewport);
activeSheet.setFormula(2, 0, "=A1+A2", GcSpread.Sheets.SheetArea.viewport);
activeSheet.setValue(0, 1, 3, GcSpread.Sheets.SheetArea.viewport);
activeSheet.setValue(1, 1, 4, GcSpread.Sheets.SheetArea.viewport);
activeSheet.setFormula(2, 1, "=B1+B2", GcSpread.Sheets.SheetArea.viewport);
var fromRange = new GcSpread.Sheets.Range(0, 0, 3, 2);
var toRanges = [new GcSpread.Sheets.Range(4, 0, 3, 2)];
$("#button1").click(function () {
//Cut Paste Action
var clipboardCutPasteAction = new GcSpread.Sheets.UndoRedo.ClipboardPasteUndoAction(activeSheet, activeSheet, activeSheet, { fromRange: fromRange, pastedRanges: toRanges, isCutting: true, clipboardText: "" }, GcSpread.Sheets.ClipboardPasteOptions.Values);
clipboardCutPasteAction.execute(activeSheet);
});
$("#button2").click(function () {
//Copy Paste Action
var clipboardCopyPasteAction = new GcSpread.Sheets.UndoRedo.ClipboardPasteUndoAction(activeSheet, activeSheet, activeSheet, { fromRange: fromRange, pastedRanges: toRanges, isCutting: false, clipboardText: "" }, GcSpread.Sheets.ClipboardPasteOptions.Values);
clipboardCopyPasteAction.execute(activeSheet);
});
//Add button controls to page
<input type="button" id="button1" value="button1"/>
<input type="button" id="button2" value="button2"/>