PHP code example of samuelvi / spreadsheet-translator-provider-onedrive
1. Go to this page and download the library: Download samuelvi/spreadsheet-translator-provider-onedrive 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-onedrive example snippets
use Atico\SpreadsheetTranslator\Core\Configuration\Configuration;
use Atico\SpreadsheetTranslator\Provider\OneDrive\OneDriveProvider;
$configuration = new Configuration([
'source_resource' => 'https://onedrive.live.com/embed?id=YOUR_FILE_ID',
'temp_local_source_file' => '/tmp/spreadsheet.xlsx',
'format' => 'xlsx',
]);
$provider = new OneDriveProvider($configuration);
$resource = $provider->handleSourceResource();
// The spreadsheet is now downloaded to the temporary file
echo $resource->getValue(); // /tmp/spreadsheet.xlsx