Posted 18 October 2021, 5:11 am EST
Hi,
The dev confirmed that SJS does not support the following two cases while copy-pasting.
- copy/paste outline in the same sheet.
- copy/paste outline from one sheet to another sheet when not copy whole sheet.
Further, You may look to the following workaround and let me know if you still face any issue.
var oldClipboardPasteCommand = GC.Spread.Sheets.Commands.clipboardPaste.execute;
GC.Spread.Sheets.Commands.clipboardPaste.execute = function (context, options, isUndo) {
var self = this, fromRanges = options.fromRanges, wholeSheet = fromRanges && fromRanges.length === 1 && fromRanges[0].row === -1 && fromRanges[0].col === -1;
if (wholeSheet) {
let commandManager = context.commandManager(), oldSheetName = options.fromSheet.name(), newSheetName = options.sheetName, targetIndex = context.getSheetIndex(newSheetName);
context.removeSheet(targetIndex);
return commandManager.execute({cmd: "copySheet", sheetName: oldSheetName, targetIndex: targetIndex, newName: newSheetName, includeBindingSource: true});
}
return oldClipboardPasteCommand(context, options, isUndo);
}
Regards
Avinash