title: How can I clone a workbook in Spire.XLS?
body: <p>I have a <code>Spire.Xls.Workbook</code> object which I would like to clone. Since the class doesn't offer a <code>Clone</code> method I tried to create a new workbook and copy all existing worksheets over from the existing workbook. This is my code:</p>
  
  <pre><code>public void Clone(Workbook workbook, string fileName)
  {
      var clone = new Workbook();
  
      // copy worksheets to List to be able to use foreach
      var worksheets = workbook.Worksheets
          .Cast&lt;Worksheet&gt;()
          .ToList();
  
      foreach (Worksheet worksheet in worksheets)
      {
          var clonedSheet = worksheet.Clone(worksheet.Parent);
          clone.Worksheets.Add((IWorksheet)clonedSheet);
      }
  
      clone.SaveToFile(fileName, ExcelVersion.Version2007);
  }
  </code></pre>
  
  <p>The method completes without an error, the file gets created but it doesn't contain any of the cloned worksheets. Am I doing something wrong or is it just not possible to create a clone of a <code>Workbook</code> object?</p>