Copy Ranges of Excel

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 some overload Range.Copy methods to copy the range. And Range.CopyStyle only the copy style of the range; Range.CopyData only the copy value of the range

Copy Range

Creating two ranges: the source range, the target range, then copying source range to target range with Range.Copy method.

See the following code:

Paste Range With Options

Aspose.Cells supports pasting the range with specific type.

Only Copy Data Of The Range.

Also you can copy the data with Range.CopyData method as the following codes:

Advance topics