I'm trying to get particular data from an excel sheet (csv).
var rows = excelsheet
.Where(x => x.Text == domain.Name
&& x.Text.Contains(domaintype.ToString()))
.Select(x => x.Start.Row)
.ToList();
I want it to filter on the domain name and any cell in that row can have word x.Text.Contains(domaintype.ToString()
inside of it.
But it comes up empty when I run the code. Only doing either of the where clauses works just fine. But I need both of the clauses at the same time to work. I need the row numbers for the code to work.
Here is an example:
"1 ; Respect ; Hielden uw zorgverleners rekening met uw privacy? ; Vraag antenataal 11"
domain.Name
is "Respect", domaintype
is, in this case, "antenataal". So I want every row number that has these two filters in it.
I know that domain.Name
has "Respect" in it and domaintype
has "antenataal" in it (through debugging).