[]
        
(Showing Draft Content)

Cut or Copy Across Sheets

In GcExcel .NET, it is possible to cut or copy data across a range of cells or several worksheets without the need to copy and paste the information into each of the cells or sheets individually.

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.

// Copy across sheets
 worksheet.Range["A5"].Copy(worksheet2.Range["A1"]);

Cut across sheets

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

 // Cut across sheets
worksheet.Range["A2"].Cut(worksheet2.Range["A3"]);