Swaps the data and formatting in a block of cells on this sheet with another block of cells on this sheet.
This example swaps the data between two ranges of cells.
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 Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10