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

WIP: Sorting cells having formulas (#105) #1565

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

Pankraty
Copy link
Member

@Pankraty Pankraty commented Nov 17, 2020

This is a work in progress

✔️ The issue nr. 1. Sorting algorithm swaps cells leaving their A1-style formulas unchanged.
✔️ The issue nr. 2. Cells with formulas are compared by InnerText which is nonsense. As a consequence, formula A10+B10 goes before A2+B2 no matter what are the results of those formulas.
🟥 The issue nr. 3. When two cells are compared, ClosedXML analyzes their DataType and if they both have Text they are compared as text, and 2 considered larger than 10.

I think we should implement a comparer that will handle different combinations of data types, blanks, formulas, etc. But right now I don't have enough time. Will try to get back to this sometime later.

Fixes #105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sort does not work properly when using Formula's
1 participant