我现在想连续复制粘贴
-
- FarPoint.Win.Spread.Model.CellRange cr = new FarPoint.Win.Spread.Model.CellRange(2, -1, 3, 3);
- fpSpread1.ActiveSheet.ClipboardCopy(cr, ClipboardCopyOptions.All);
- fpSpread2.ActiveSheet.Rows.Add(fpSpread2.ActiveSheet.RowCount, 1);
- fpSpread2.ActiveSheet.AddSelection(fpSpread2.ActiveSheet.RowCount - 1, 0, 1, 4);
- fpSpread2.ActiveSheet.ClipboardPaste(ClipboardPasteOptions.All);
- cr = new FarPoint.Win.Spread.Model.CellRange(4, -1, 3, 3);
- fpSpread1.ActiveSheet.ClipboardCopy(cr, ClipboardCopyOptions.All);
- fpSpread2.ActiveSheet.Rows.Add(fpSpread2.ActiveSheet.RowCount, 1);
- fpSpread2.ActiveSheet.AddSelection(fpSpread2.ActiveSheet.RowCount - 1, 0, 1, 4);
- fpSpread2.ActiveSheet.ClipboardPaste(ClipboardPasteOptions.All);
复制代码
上述代码是我想通过连续复制粘贴方法,实现多个不连续单元格的复制粘贴
但是我发现我只能保存到最后一条,有没有办法实现我这样子的连续复制粘贴;
如果我这种方法有问题,不知BZ们能不能提供一个比较好的思路来解决这个问题 |