您好,
copyTo方法不支持将一行区域复制给多行(没有相关参数的设置)
您可以调用 clipboardPaste 命令实现此需求,
具体请参考下方代码:
- var activeSheet = spread.getActiveSheet();
- var fromRange = [new GC.Spread.Sheets.Range(0, 0, 1, 6)];
- var toRanges = [new GC.Spread.Sheets.Range(1, 0, 10, 6)];
- spread.commandManager().execute({
- cmd: "clipboardPaste",
- sheetName: "Sheet3",
- fromSheet: activeSheet,
- fromRanges: fromRange,
- pastedRanges: toRanges,
- isCutting: false,
- clipboardText: "",
- pasteOption: GC.Spread.Sheets.ClipboardPasteOptions.all
- });
复制代码
|