Skip to main content
A newer version of this page is available. .
Row

WorkbookExtensions.Clone(IWorkbook, Boolean) Method

Creates a workbook copy and specifies whether the resulting document should contain formula results instead of formula expressions.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Docs.v18.2.dll

Declaration

public static Workbook Clone(
    this IWorkbook workbook,
    bool copyFormulas
)

Parameters

Name Type Description
workbook IWorkbook

An object exposing the IWorkbook interface that specifies the source workbook for copying.

copyFormulas Boolean

true, to copy formulas of the source workbook; otherwise, false. If false, only the calculated results are copied.

Returns

Type Description
Workbook

A Workbook object that is the created copy.

Remarks

The Clone method is an extension method of the object that exposes the IWorkbook interface (SpreadsheetControl.Document or non-visual Workbook) and is called by using instance method syntax.

Use the current Clone method overload to create a copy of the specified workbook without formulas: the resulting document retains only the formula results.

See Also