How to: Clone a Workbook
Important
The Workbook class is defined in the DevExpress.
The following example demonstrates how to use the WorkbookExtensions.Clone method to create a workbook copy.
Use the WorkbookExtensions.Clone method overload with the copyFormulas parameter set to false to create a copy that replaces formulas with their calculated results.
// Add a reference to the DevExpress.Docs.dll assembly.
using DevExpress.Spreadsheet;
// ...
// Create a new Workbook object.
Workbook workbook = new Workbook();
workbook.LoadDocument("Document.xlsx", DocumentFormat.Xlsx);
// Create a copy of the Workbook object.
Workbook copy = workbook.Clone();