mkhuwaja / linqtoexcel

Automatically exported from code.google.com/p/linqtoexcel
0 stars 0 forks source link

StartsWith and EndsWith cause exceptions #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Use StartsWith, or EndsWith, in a "where", e.g. "where 
r.surname.StartsWith("A")"

What is the expected output? What do you see instead?
Expect to see rows with values starting with "A". Instead, get an 
exception:
An unhandled exception of type 'System.InvalidCastException' occurred in 
LinqToExcel.dll

Additional information: Unable to cast object of 
type 'System.Linq.Expressions.MemberExpression' to 
type 'System.Linq.Expressions.MethodCallExpression'.

What version of the product are you using? On what operating system?
v58. WinXP.

Please provide any additional information below.
I'm trying to do something that is a bit like SQL's "like" predicate, so 
any other way of achieving the same result -- apart from writing 
extra "if" tests -- would be helpful.

Original issue reported on code.google.com by jd.r...@gmail.com on 10 Mar 2010 at 3:50

GoogleCodeExporter commented 8 years ago
This is implemented in version 1.1.60 that can be downloaded here: 
http://linqtoexcel.googlecode.com/files/LinqToExcel_1.1.60.zip

Original comment by paulyo...@gmail.com on 11 Mar 2010 at 1:08