New issue 61 by dalega...@gmail.com: doesn't work with System.String
functions?
http://code.google.com/p/linqtoexcel/issues/detail?id=61
What steps will reproduce the problem?
Something like this works:
(assuming one of the values of "code" is "hello")
my_string="hello";
var dr = (from r in excel.Worksheet()
where my_string ==(r["code"])
select r).FirstOrDefault();
but THIS, does not:
var dr = (from r in excel.Worksheet()
where my_string.Contains(r["code"])
select r).FirstOrDefault();
this does not find a match. :-(
Using this on Windows 2008 R2, 64-bit.
Man, this is so cool. close, but no cigar for my application.
Comment #1 on issue 61 by paulyo...@gmail.com: doesn't work with
System.String functions?
http://code.google.com/p/linqtoexcel/issues/detail?id=61
where my_string.Contains(r["code"]) creates an invalid SQL statement.
(SELECT * FROM Worksheet WHERE "hello" LIKE code)
You can swap the statement though.
where r["code"].Contains(my_string)
which creates this valid SQL statement: SELECT * FROM Worksheet WHERE code
LIKE '%hello%'