title: How to copy a worksheet from a workbook to new Workbook in Epplus?
body: <pre><code>    try
      {
  
       FileInfo resultFile = new FileInfo(@"C:\\Users\\350154\\Desktop\\vb workouts\\testsample.xlsx");
       if (resultFile.Exists)
           {
              resultFile.Delete();
           }
  ExcelPackage masterPackage = new ExcelPackage(new FileInfo(@"C:\\Users\\350154\\Desktop\\vb workouts\\testsample.xlsx"));
  
                  ExcelPackage pckg = new ExcelPackage(new FileInfo(@"C:\\Users\\350154\\Desktop\\vb workouts\\y.xlsx"));
  
                  string workSheetName = pckg.Workbook.Worksheets[1].Name;
                 masterPackage.Workbook.Worksheets.Add(workSheetName, pckg.Workbook.Worksheets[1]);
                masterPackage.Workbook.Worksheets.Add("test");
                masterPackage.SaveAs(new FileInfo(@"C:\\Users\\350154\\Desktop\\vb workouts\\testsample.xlsx"));
  }catch(excption e){
  console.writeline();
  }
  </code></pre>
  
  <p>Hi,Am using Epplus to copy a worksheet from a workbook to a new workbook and create as a ne worksheet.My code is above.I am using Epplus4.0 .But am not able to process my code.<strong>Error is arising:Error Saving File</strong>
  please help me to solve my issue.</p>