-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
Cell::fromValue() incorrectly detect a formula #132
Comments
Hi, thank you for raising this topic, but I disagree with your PoV on the topic: It would be a PITA for everyone having to explicitely call |
I agree with you that This would later lead to unforeseen bugs. Consider the following case (which happened to me, hence this topic):
So, bottom line is that I do understand your point, and you are probably right about it. But the current situation is also painful for other use case. Additionally, I find it regretable that Cell class is abstract (and thus, can be extended) but |
That's very wrong: you should indeed control what your users input, or at least how that inputs are treated during export.
I'd accept a PR with such change
You are not forced to use
I'd accept a PR for this too 👍
That's a defensive architectural choice: it leads to much fewer bugs, or at least much more obvious bugs. |
Greetings beautiful people who made this bundle!
I've found today that
Cell::fromValue()
automatically consider any string starting by=
as a formula.While I totally understand why you did this, I believe it's not the way to handle it. I think that if people want to create a cell for a formula, they should use
new FormulaCell()
instead, since it's a more specific ude case.Most people will use
Cell::fromValue()
with "basic" database data (string, int, date...). And an=
sign could be used in many of "normal" field. For instance, in a phone number field, if someone miss the shift key to make a "+", it turns it into a "=" (yes, it actually happened to me).But also in a "comment" field. Some people sometimes start their comment with a "=", for example when they explain something, or give the full meaning of an acronym, etc...
The text was updated successfully, but these errors were encountered: