Back to Devexpress

WorkbookExtensions.Clone(IWorkbook, Boolean) Method

officefileapi-devexpress-dot-spreadsheet-dot-workbookextensions-dot-clone-x28-devexpress-dot-spreadsheet-dot-iworkbook-system-dot-boolean-x29.md

latest2.7 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Document.Processor

Declaration

csharp
public static Workbook Clone(
    this IWorkbook workbook,
    bool copyFormulas
)
vb
<ExtensionAttribute>
Public Shared Function Clone(
    workbook As IWorkbook,
    copyFormulas As Boolean
) As Workbook

Parameters

NameTypeDescription
workbookIWorkbook

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

TypeDescription
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

WorkbookExtensions Class

WorkbookExtensions Members

DevExpress.Spreadsheet Namespace