FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class : SwapRange Method |
'Declaration Public Sub SwapRange( _ ByVal fromRow As Integer, _ ByVal fromColumn As Integer, _ ByVal toRow As Integer, _ ByVal toColumn As Integer, _ ByVal rowCount As Integer, _ ByVal columnCount As Integer, _ ByVal dataOnly As Boolean _ )
Exception | Description |
---|---|
System.InvalidOperationException | Operation is not valid; cannot swap entire sheet of cells |
System.InvalidOperationException | Operation is not valid; cannot swap entire columns over partial columns |
System.InvalidOperationException | Operation is not valid; cannot swap entire rows over partial rows |
System.InvalidOperationException | Operation is not valid; cannot swap a range of cells over part of a spanned cell |
int i, j; fpSpread1.ActiveSheet.RowCount = 10; fpSpread1.ActiveSheet.ColumnCount = 10; for (i = 0; i <= 9; i ++) { for (j = 0; j <= 9; j++) { fpSpread1.ActiveSheet.SetValue(i, j, i + 1); } } fpSpread1.ActiveSheet.SwapRange(0, 0, 3, 0, 3, 3, true); }
Dim i, j As Integer FpSpread1.ActiveSheet.RowCount = 10 FpSpread1.ActiveSheet.ColumnCount = 10 For i = 0 To 9 For j = 0 To 9 FpSpread1.ActiveSheet.SetValue(i, j, i + 1) Next j Next i FpSpread1.ActiveSheet.SwapRange(0, 0, 3, 0, 3, 3, True)
Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8