EPPlus throws an exception when I copy a worksheet from Book1.xlsx to Book2.xlsm.
I can fix the null reference exception in my copy of your code by only copying the VBA code across if Copy.CodeModule != null (around line 275 of ExcelWorksheets.cs).
Then the copy is successful, but named ranges are all broken (i.e. have disappeared) in the resulting copied worksheet.
[NOTE I have repurposed my issue to report what I think is an actual EPPlus issue, rather than me being an idiot]
I can fix the null reference exception in my copy of your code by only copying the VBA code across if Copy.CodeModule != null (around line 275 of ExcelWorksheets.cs).
Then the copy is successful, but named ranges are all broken (i.e. have disappeared) in the resulting copied worksheet.
[NOTE I have repurposed my issue to report what I think is an actual EPPlus issue, rather than me being an idiot]