Since version 7.2, copying a row as a new rows within a worksheet throws exception, unless we do specify this flag - ExcelRangeCopyOptionFlags.ExcludeDrawings :
// rowNumber + 1 is the destination row (copying a template row as new row in the worksheet) ws.Cells["A8:M8"].Copy(ws.Cells[$"A{rowNumber + 1}:M{rowNumber + 1}"], ExcelRangeCopyOptionFlags.ExcludeDrawings);
`
Exception seems to come from RangeCopyHelper.CopyDrawings()
EPPlus usage
Noncommercial use
Environment
Windows
Epplus version
since 7.2
Spreadsheet application
No response
Description
Since version 7.2, copying a row as a new rows within a worksheet throws exception, unless we do specify this flag - ExcelRangeCopyOptionFlags.ExcludeDrawings :
// rowNumber + 1 is the destination row (copying a template row as new row in the worksheet)
ws.Cells["A8:M8"].Copy(ws.Cells[$"A{rowNumber + 1}:M{rowNumber + 1}"], ExcelRangeCopyOptionFlags.ExcludeDrawings); `Exception seems to come from RangeCopyHelper.CopyDrawings()