merceslab / spreadsheet-client-bundle
Import data from and export data to google spreadsheets
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^7.1.3
- merceslab/spreadsheet-client: ^1.0
- symfony/config: ^3.4|^4.1
- symfony/dependency-injection: ^3.4|^4.1
- symfony/http-kernel: ^3.4|^4.1
This package is auto-updated.
Last update: 2024-10-13 04:15:58 UTC
README
composer require merceslab/spreadsheet-client-bundle
Configuration
merces_lab_google_spreadsheet:
credentials: '{}' # JSON string
files: # optional, creates a GoogleFile service named 'merces_lab.spreadsheet_client.google.file.my_file'
my_file:
file: 'myFileId'
sheets: # optional, creates a GoogleSheet service named 'merces_lab.spreadsheet_client.google.sheet.my_sheet'
my_sheet:
file: 'myFileId'
sheetName: 'mySheet'
tables: # optional, creates a GoogleTable service named 'merces_lab.spreadsheet_client.google.table.my_table'
my_table:
file: 'myFileId'
sheetName: 'mySheet'
tableRange: 'H1:AA1'
Usage
To write data into a Google Spreadsheet:
<?php use MercesLab\Component\SpreadsheetClient\ClientInterface; class SomeService { public function export(ClientInterface $client) { $client->write(['foor', 'bar',], 'myFile'); } }
To read data from a Google Spreadsheet:
<?php use MercesLab\Component\SpreadsheetClient\ClientInterface; class SomeService { public function import(ClientInterface $client) { $data = $client->read('fileId'); } }
Check the component documentation: https://github.com/MercesLyon/GoogleFixtures