0

I am having troubles with Zend_Gdata API for google spreadsheets queries.

I want to perform a query returning every empty value of a given column/field.

My code:

    $query = new Zend_Gdata_Spreadsheets_ListQuery();
    $query->setSpreadsheetKey($this->spreadsheetKey);
    $query->setWorksheetId($this->worksheetId);
    $query->setSpreadsheetQuery('FIELD!=""');
    $feed = $this->spreadsheetService->getListFeed($query);

If I perform the same operation with this url:

http://spreadsheets.google.com/feeds/list/KEY/oda/private/full?sq=FIELD!=""

I obtain the desired output.

Any idea?

Giu87
  • 96
  • 5

2 Answers2

0

I solved the problem. For the ones that have the same problem, the query table has to have in the first row the names of the columns (fields) you are querying.

ex:

    $query->setSpreadsheetQuery('FIELD!=""');

The table has to have a FIELD column.

Giu87
  • 96
  • 5
0

try to manually delete empty rows that are inside other not empty rows because Giu87's solution doesnt work in my code