Skip to main content
Row

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

WorkbookExtensions.Clone(IWorkbook, Boolean) Method

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

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

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Docs.v24.2.dll

NuGet Package: DevExpress.Document.Processor

#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