Forum Discussion

missydr's avatar
missydr
Occasional Contributor
6 years ago
Solved

Running a query on Excel sheet coming back with no values

I'm trying to pull a specific value from an Excel sheet by using a query but I get back nothing in my log.  I've spent too much time already trying to get it to work. See the script below that I crea...
  • tristaanogre's avatar
    tristaanogre
    6 years ago

    Yes, basicly the problem is in your query.  

    myDriver.Value(0) should work so long as you actually have data to retrieve.  So, it's possible that your query is not returning anything due to the WHERE clauses.

     

    My GUESS is that the "Date" field, you're doing a where clause assuming it's a string... I'm betting it's NOT a string and that it's actually a date/time value in your execl spreadsheet so the string comparison won't work.  You should check the actual spreadsheet and format that column to string if you want to use that Where clause or, somehow, replace the date string you have with the appropriate date/time value.