Closed GoogleCodeExporter closed 9 years ago
To get around it I can do:
var licenceInfo = from c in excel.WorksheetNoHeader()
select new LicenceImport() { SerialNo = c[0], LicenceKey = c[11] };
var data = licenceInfo.Where(x => !String.IsNullOrWhiteSpace(x.LicenceKey) &&
!String.IsNullOrWhiteSpace(x.SerialNo)).ToList();
Original comment by jonathan...@gmail.com
on 12 Oct 2011 at 3:11
The OleDb driver doesn't know how to translate String.IsNullOrWhiteSpace, so
you'll have to remove the where clause to retrieve all the rows to an in memory
list, and then you can filter the results. This is exactly what you did in your
workaround, and I'm pretty sure that's the only way to do it.
Original comment by paulyo...@gmail.com
on 12 Oct 2011 at 3:39
Original issue reported on code.google.com by
jonathan...@gmail.com
on 12 Oct 2011 at 2:53Attachments: