Syncfusion.XlsIO.Base
Example 


Represents the destination Range to move.

MoveTo Method

Moves cells to the specified Range (without updating formulas).
Syntax
'Declaration
 
Sub MoveTo( _
   ByVal destination As IRange _
) 
'Usage
 
Dim instance As IRange
Dim destination As IRange
 
instance.MoveTo(destination)
void MoveTo( 
   IRange destination
)

Parameters

destination
Represents the destination Range to move.
Example
The following code illustrates how to move the Range.
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
IWorksheet sheet = workbook.Worksheets[0];
            
// Moving a Range �A1� to �A5�.
IRange source = sheet.Range["A1"];
IRange destination = sheet.Range["A5"];
source.MoveTo(destination);
            
workbook.Version = ExcelVersion.Excel2013;
workbook.SaveAs("MoveRange.xlsx");
workbook.Close();
excelEngine.Dispose();
AssemblyVersion

Syncfusion.XlsIO.Base: 16.3460.0.29

See Also