Skip to main content
Row

Worksheet.CopyFrom(Worksheet) Method

Copies the specified worksheet into the current instance.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v24.1.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

void CopyFrom(
    Worksheet source
)

Parameters

Name Type Description
source Worksheet

A Worksheet object that specifies the source worksheet for copying.

Example

This example demonstrates how to create a copy of an existing worksheet. To do this, follow the steps below.

View Example

// Add a new worksheet to a workbook.
workbook.Worksheets.Add("Sheet1_Copy");

// Copy all information (content and formatting) to the newly created worksheet 
// from the "Sheet1" worksheet.
workbook.Worksheets["Sheet1_Copy"].CopyFrom(workbook.Worksheets["Sheet1"]);

The following code snippets (auto-collected from DevExpress Examples) contain references to the CopyFrom(Worksheet) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also