We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please fix calculation.
The following calculation fails =IF(A1 = "","A","B") A1 <- Date cell
I propose the following corrections.
in ClosedXml.Excel.CalcEngine.Expression
public static implicit operator DateTime(Expression x) { // evaluate var v = x.Evaluate(); // handle dates if (v is DateTime) { return (DateTime)v; } // handle doubles if (v is double || v is int) { return DateTime.FromOADate((double)x); } // !!!!!NEW CODE !!!!! if (v is string || (string)v == "") { return DateTime.MinValue; } // !!!!!NEW CODE !!!!! // handle everything else CultureInfo _ci = Thread.CurrentThread.CurrentCulture; return (DateTime)Convert.ChangeType(v, typeof(DateTime), _ci); }
Thanks!
The text was updated successfully, but these errors were encountered:
ClosedXmlTest.zip
Sorry, something went wrong.
Thanks, but your changes break a lot of other tests. I will look into a different solution to the problem.
Catch implicit conversion that fails. Fixes ClosedXML#117 .
d9a66f1
Thanks! I am looking forward to installing from nget.
No branches or pull requests
Please fix calculation.
The following calculation fails
=IF(A1 = "","A","B")
A1 <- Date cell
I propose the following corrections.
in ClosedXml.Excel.CalcEngine.Expression
Thanks!
The text was updated successfully, but these errors were encountered: