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

Update to 7.1 ExcelRange.LoadFromCollection error: The Order property has not been set. Use the GetOrder method to get the value. #1395

Open
TheQuake opened this issue Apr 2, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@TheQuake
Copy link

TheQuake commented Apr 2, 2024

EPPlus usage

Noncommercial use

Environment

Windows IIS

Epplus version

7.1.0

Spreadsheet application

Excel

Description

Update to 7.1 ExcelRangeBase.LoadFromCollection error: The Order property has not been set. Use the GetOrder method to get the value. The changelog specifically mentions an ExcelRangeBase.LoadFromCollection improvment. What needs to be changed?

@swmal
Copy link
Contributor

swmal commented Apr 4, 2024

@TheQuake - thanks for reporting. EPPlus does not throw an Exception with this message from what I can see. It seems to come from the System.ComponentModel.DataAnnotations.Display attribute.

Can you provide some more information that might help us to replicate this issue? The code for the T class that you use in LoadFromCollection<T> would be useful.

@TheQuake
Copy link
Author

@swmal - Thanks! It's a POCO that had an attribute over a single read-only (get only) property, specifically: ( [Display(Name = "Product")] ). Since the exception was related to annotations, I removed it & voila, it works now. I don't need that decoration, but if you wish to pursue this further, let me know.

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

2 participants