Copy Ranges of Excel with Golang via C++
Contents
[
Hide
]
Introduction
In Excel, you can select a range, copy the range, then paste it with specific options to the same worksheet, other worksheets, or other files.
Copy Ranges Using Aspose.Cells
Aspose.Cells provides several overloaded Range.Copy methods to copy a range. And Range.CopyStyle copies only the style of the range; Range.CopyData copies only the values of the range.
Copy Range
Creating two ranges: the source range and the target range, then copying the source range to the target range using the Range.Copy method.
See the following code:
Paste Range With Options
Aspose.Cells supports pasting the range with a specific type.
Only Copy Data Of The Range
You can also copy the data with the Range.CopyData method as shown in the following code: