PHP code example of samuelvi / spreadsheet-translator-provider-googledriveauth

1. Go to this page and download the library: Download samuelvi/spreadsheet-translator-provider-googledriveauth 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/ */

    

samuelvi / spreadsheet-translator-provider-googledriveauth example snippets


use Atico\SpreadsheetTranslator\Core\Configuration\Configuration;
use Atico\SpreadsheetTranslator\Provider\GoogleDriveAuth\GoogleDriveAuthProvider;

$configuration = new Configuration([
    'application_name' => 'My Application',
    'credentials_path' => '/path/to/credentials.json',
    'client_secret_path' => '/path/to/token.json',
    'source_resource' => 'https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit',
    'format' => 'xlsx',
    'temp_local_source_file' => '/tmp/output.xlsx'
]);

$provider = new GoogleDriveAuthProvider($configuration);
$resource = $provider->handleSourceResource();