PHP code example of wunderdata / google-spreadsheet-api

1. Go to this page and download the library: Download wunderdata/google-spreadsheet-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wunderdata / google-spreadsheet-api example snippets




// Instantiate the Google client.
// You need a valid access key and the Buzz browser for HTTP requests.
$client = new \Wunderdata\Google\Client($accessKey, $buzz);

// Get a list of all spreadsheets
$spreadsheets = $client->loadSpreadsheets();

// Load all worksheets from the first spreadsheet in the list
$worksheets = $client->loadWorksheets($spreadsheets[0]);

// Load the cell feed for the first worksheet in the list
$cellFeed = $client->loadCellFeed($worksheets[0]);

// Get content from cell B3
$b3 = $cellFeed->findCell('B3');