Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RangeCopyHelper.CopyDrawings() throws "Object reference not set to an instance of an object." #1651

Open
CarlVerret opened this issue Oct 22, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@CarlVerret
Copy link

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()

@CarlVerret CarlVerret added the bug Something isn't working label Oct 22, 2024
@JanKallman
Copy link
Contributor

This is likely the same as issue #1645. This happens is you have a drawing with One-Cell anchor or Absolut positioning.
A fix is on the way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants
@JanKallman @CarlVerret and others