copy method
copy
Copies data (including formulas), formatting, drawing objects etc. from a source range.
def copy(self, range):
...
Parameter | Type | Description |
---|---|---|
range | Range | Source Range object. |
Example
from aspose.cells import Workbook
# Instantiating a Workbook object
workbook = Workbook()
# Get the first Worksheet Cells.
cells = workbook.worksheets[0].cells
range1 = cells.create_range("A1:A5")
range2 = cells.create_range("A6:A10")
# Copy the range.
range1.copy(range2)
# Save the Excel file
workbook.save("book1.xlsm")
copy
Copying the range with paste special options.
def copy(self, range, options):
...
Parameter | Type | Description |
---|---|---|
range | Range | The source range. |
options | PasteOptions | The paste special options. |
See Also
- module
aspose.cells
- class
Range