Spread 本身没有提供区域保存的功能,不过通过Spread提供的ClipboardCopy和ClipboardPaste方法可以很方便的实现区域保存:
- fpSpread1.ActiveSheet.ClipboardCopy(fpSpread1.ActiveSheet.GetSelection(0), FarPoint.Win.Spread.ClipboardCopyOptions.All);
- FarPoint.Win.Spread.FpSpread spread = new FarPoint.Win.Spread.FpSpread();
- FarPoint.Win.Spread.SheetView view = new FarPoint.Win.Spread.SheetView();
- view.ClipboardPaste();
- spread.Sheets.Add(view);
- spread.SaveExcel("test.xls");
复制代码 |