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
Wishlist: ability to throw exception if formula seen in CSV #11
Comments
Pull and see if that fits your needs. Comments welcome. (Does not yet have tests) |
|
With this CSV:
I get this diagnostic:
Which seems wrong. |
I'll have a look soonish. You do agree to my approach (if it works)? |
Yes -- looks good! |
Right, I've done a bit more, and plan to release this asap. Last minute feedback is of course welcome. I'll also ask PM for feedback |
👍 |
1.34 will throw an exception instead of a warning. |
You may have seen this blog post, about potential security problems with CSV files that have formulae in cells:
In a perfect world, all of my existing code that uses
Text::CSV_XS
would start throwing exceptions if they got CSVs with formulae in them. If users have to turn on some "don't allow formulae in cells" feature, then it's not going to help most people, because most people won't (a) know about the potential problem, or (b) the module's support for protecting you.I'm guessing that for backwards compatibility reasons you might not want to add this as a feature that's enabled by default, but I think you should at least consider it.
That said, following on from email, I might want to write:
The
formula
parameter could be croak, allow, diag, empty (blank out all such cells), or undef (return cell asundef
).Personally i'd make the default be croak, but I realise you don't want code to suddenly start breaking, so maybe diag could be the default?
The text was updated successfully, but these errors were encountered: