Range.Copy
Contents
[
Hide
]Copy(Range, PasteOptions)
Copying the range with paste special options.
public void Copy(Range range, PasteOptions options)
Parameter | Type | Description |
---|---|---|
range | Range | The source range. |
options | PasteOptions | The paste special options. |
See Also
- class PasteOptions
- class Range
- namespace Aspose.Cells
- assembly Aspose.Cells
Copy(Range)
Copies data (including formulas), formatting, drawing objects etc. from a source range.
public void Copy(Range range)
Parameter | Type | Description |
---|---|---|
range | Range | Source Range object. |
Examples
[C#]
//Instantiating a Workbook object
Workbook workbook = new Workbook();
// Get the first Worksheet Cells.
Cells cells = workbook.Worksheets[0].Cells;
Range range1 = cells.CreateRange("A1:A5");
Range range2 = cells.CreateRange("A6:A10");
//Copy the range.
range1.Copy(range2);
//Save the Excel file
workbook.Save("book1.xlsm");
[Visual Basic]
'Instantiating a Workbook object
Dim workbook As Workbook = New Workbook()
'Get the first Worksheet Cells.
Dim cells as Cells = workbook.Worksheets[0].Cells
Range range1 = cells.CreateRange("A1:A5")
Range range2 = cells.CreateRange("A6:A10")
//Copy the range
range1.Copy(range2)
'Save the Excel file
workbook.Save("book1.xlsm")
See Also
- class Range
- namespace Aspose.Cells
- assembly Aspose.Cells