Posted 18 December 2017, 7:41 pm EST
I’m trying to get the copy / paste functionality in code.
1.User copy from spread js and pastes to excel using below code:
//initialization
let spread = new GC.Spread.Sheets.Workbook(element[0], {allowCopyPasteExcelStyle: true});
//copy
spread.getWorkbook().commandManager().execute({cmd: “copy”});
This code does not work when I paste to excel, it works using keyboard keys.
- User copy from outside and paste in spread:
//paste
spread.getWorkbook().commandManager().execute({cmd: “clipboardPaste”, pasteOption: GC.Spread.Sheets.ClipboardPasteOptions.all});
The above code does not work, but works when I use keyboard keys and not code.
Can you please advise what needs to changed. Is there a code sample I can use as a reference? Thank you