Aspose::Cells::Range::Copy method

Range::Copy(const Range&, const PasteOptions&) method

Copying the range with paste special options.

void Aspose::Cells::Range::Copy(const Range &range, const PasteOptions &options)
ParameterTypeDescription
rangeconst Range&The source range.
optionsconst PasteOptions&The paste special options.

See Also

Range::Copy(const Range&) method

Copies data (including formulas), formatting, drawing objects etc. from a source range.

void Aspose::Cells::Range::Copy(const Range &range)
ParameterTypeDescription
rangeconst Range&Source Range object.

Examples

Aspose::Cells::Startup();
//Instantiating a Workbook object
Workbook workbook;
// Get the first Worksheet Cells.
Cells cells = workbook.GetWorksheets().Get(0).GetCells();
Range range1 = cells.CreateRange(u"A1:A5");
Range range2 = cells.CreateRange(u"A6:A10");
//Copy the range.
range1.Copy(range2);
//Save the Excel file
workbook.Save(u"book1.xlsm");

Aspose::Cells::Cleanup();

See Also