1. Go to this page and download the library: Download arindam/gsheet-appscript 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/ */
use GsheetAppScript;
GsheetAppScript::allRecords(); //get all records from google sheet
GsheetAppScript::addRow(['Text1', 'Text2', 'Text3' ...]); //add row in the google sheet
GsheetAppScript::setHeading(['Heading1', 'Heading2', 'Heading3' ...]); //set or edit heading in the google sheet
GsheetAppScript::editRow(['id' => 4, 'Text1', 'Text2', 'Text3' ...]); //edit data in the google sheet, just pass the row number as id with data
GsheetAppScript::removeRow(['id' => 4]); //remove row from google sheet, just pass the row number
GsheetAppScript::clearSheet(); //delete all records in google sheet
/** If you want to disable the route or this feature, then make it false */
'is_route_enabled' => true,
/** If you want to change the route prefix */
'route_prefix' => 'onex',
/** If you want to change the route name or path */
'route_name' => 'gsheet',
/** If you want to change the page heading */
'page_heading' => 'Google Sheet',
/** If you want to enable the securiry for access the google sheet information
* Then make it ('is_enabled') true and also you can set login-id and password through .env
*/
'authentication' => [
'is_enabled' => env('GSHEET_APPSCRIPT_AUTH_ENABLED', false),
'login_id' => env('GSHEET_APPSCRIPT_LOGIN_ID', 'onexadmin'),
'password' => env('GSHEET_APPSCRIPT_LOGIN_PASSWORD', 'onexpassword')
]
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.