159 responses to “Saving Form Data to Google Spreadsheets Using PHP and the Google Docs API”

  1. Abbas

    Thanks for all the help. I really appreciate it :)

  2. Matt

    Hey Dimas,

    Great helper class, I’m having all kinds of ideas for using this.

    One question:
    If we wanted to specify rows by more than one parameter, how is this done?

    i.e. let’s say I have a spreadsheet with the columns “campaign”, “action”, and “total”. My script gets the campaign value and the action value and I want to increment the total column for the row that matches BOTH campaign and action columns.
    So how do I specify, in the getRows and updateRows functions, that I only want the row that matches both?

  3. Danilo

    hello dimas,
    thx for api!
    but… i found a bug,
    your api only work when the worksheet name is the same of spreadsheet, ex:
    it works:
    $ss->useWorksheet(“Hillodb”);
    $ss->useSpreadsheet(“Hillodb”);

    it not works:
    $ss1->useWorksheet(“Hillodb”);
    $ss1->useSpreadsheet(“Aprovadas”);

    Error:
    Uncaught exception ‘Zend_Gdata_App_Exception’ with message ‘A spreadsheet key must be provided for list queries.’ in /home/content/22/3917722/html/dann/hillo/canvas/Zend/Gdata/Spreadsheets/ListQuery.php:264

    why?
    can u helpme?
    thx in advance.

  4. jusnit

    I want to find the worksheet Id from spreadsheet itself. Any Way in PHP?

    I want to retrieve last worksheet Id from a spreadsheet .

    I manually give worksheet Id’s as ‘od6′,’od7′,’od4′ , then column values can retrieved ,but after that I cant get anymore… because no worksheet id .

    How will I find worksheet id?

    Code:

    $spreadsheetKey = ” “;//key of spreadsheet
    $query = new Zend_Gdata_Spreadsheets_DocumentQuery();
    $query->setSpreadsheetKey($spreadsheetKey);
    $feed1 = $spreadsheetService->getWorksheetFeed($query);

    $worksheetId = ‘od6′;
    $query = new Zend_Gdata_Spreadsheets_ListQuery();
    $query->setSpreadsheetKey($spreadsheetKey);
    $query->setWorksheetId($worksheetId);
    $listFeed = $spreadsheetService->getListFeed($query);
    $customEntry = $listFeed->entries[1]->getCustomByName(‘stay’);
    $customEntry->getColumnName() . ” = ” . $customEntry->getText();

  5. Douglas Machado

    Greetings,

    Does anyone knows how to add columns?

    Thanks in advanced for your help.

  6. Usman

    heloo guru,

    I am taking data from google spread sheet and shown it to web page now i wana add quick search option for adding quick search i need html of spread sheet how can i get html of spread sheet or any other solution for adding quick search.

    thanx in advance

  7. Rob

    Dear Sir,

    You are awesome.

    That is all.

  8. sumesh

    I have a google form for collecting the customer visit details of each sales person. I wish to have separate spread sheet for each sales person upon selection of sales person name from the list ( google form) the data must go to the particular sheet. can any one tel me how to do this

  9. Metaksan

    I really liked the new version…

    btw, the heigh of each row might be seen high for you, if this happens just change from the options.

  10. Mei

    Hello Dimas, thanks for sharing this. I’ve got a question: how do we get all rows in a specific column?
    Thanks.

  11. Martin Grados Salinas

    Hola excelente el ejemplo, mira tengo un problema, en mi casa me funciona normal el ejemplo, pero en mi trabajo me sale error 500.

    No se a que se pueda deber .. pero en mi trabajo tengo proxy, no sé si tenga que ver eso.

    Espero alguna respuesta, gracias.

  12. Sumit Agrawal

    Does this need features like curl, fopen etc to be enabled on my hosting server or that is not required?

1 5 6 7

Leave a Reply