# Cut or Copy Across Sheets

DsExcel allows you to cut or copy a cell or a range of cells from a specific area and paste it into another area within the same worksheet.

## Content

In DsExcel Java, you can cut or copy data across a range of cells or several worksheets without any hassle.
For instance, let's say you want the same title text to be put into different worksheets within a workbook. To accomplish this, if you type the text in one worksheet and copy,paste it into every other worksheet, the process can turn out to be both cumbersome and time-consuming.
A quick way of doing this would be to cut or copy information across cells or sheets using:

* The **copy** method to copy rows, columns, or a range of cells and paste them to destination.
* The **cut** method to cut rows, columns, or a range of cells and paste them to destination.

## Copy across sheets

Refer to the following example code to perform copy operation in a workbook.

```Java
Object[][] data = new Object[][] { { 1 }, { 3 }, { 5 }, { 7 }, { 9 } };
worksheet.getRange("A1:A5").setValue(data);
        
// Copy across sheets
IRange range = worksheet2.getRange("B7");
worksheet.getRange("A5").copy(range);
```

## Cut across sheets

Refer to the following example code to perform cut operation in a workbook.

```Java
IRange range1 = worksheet2.getRange("B3");
        
// Cut across sheets
worksheet.getRange("A3").cut(range1);
```

## See Also

[Cut or Copy Cell Ranges](/document-solutions/java-excel-api/docs/online/Features/ManageWorksheet/RangeOperations/CutOrCopyCellRanges)