Documents for Excel .NET Edition | GCDocuments
Features / Workbook / Cut or Copy Across Sheets
In This Topic
    Cut or Copy Across Sheets
    In This Topic

    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:

    Copy across sheets

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

    C#
    Copy Code
    // 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.

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

    See Also