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

hope The Range.Copy method will only copy certain ExcelRangeCopyOptionFlag, and currently excludes certain ExcelRangeCopyOptionFlags #1656

Open
minren118 opened this issue Oct 25, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@minren118
Copy link

minren118 commented Oct 25, 2024

In some cases, the Copy method is used to copy only certain ExcelRangeCopyOptionFlagof , instead of copying all types and excluding certain ExcelRangeCopyOptionFlags. For example, I just want to copy the formula, I don't need to copy anything else.

Like the VBA interface, its special paste is only for a certain type of paste,It's single-choice

image

Finally, there is a special case, that is, the selection is a cell, can not be copied to multiple cells, in the VBA interface, this can be very flexible, and even can be copied to multiple discontinuous Ranges.

The current status of EPPLUS is to copy to the target cell Range, and if the source region is a cell, the copied result is also an top left cell in this continuous region

Sub testCopyMultiRange()

Dim rng As Range

Set rng = Range("G10")
rng.Copy Range("J15:J20,G11:G20")

End Sub
@minren118 minren118 changed the title The Range.Copy method will only copy certain ExcelRangeCopyOptionFlag, and currently excludes certain ExcelRangeCopyOptionFlags hope The Range.Copy method will only copy certain ExcelRangeCopyOptionFlag, and currently excludes certain ExcelRangeCopyOptionFlags Oct 25, 2024
@JanKallman
Copy link
Contributor

Yes, I assume we could add a new overload with a new enum with "include flags" instead.
A "copy fill" function or similar is on our enhancement list, see #1271.
I'll add this issue you our enhancement project.

@JanKallman JanKallman added the enhancement New feature or request label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants
@JanKallman @minren118 and others