Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrearufo/gsx2json4php
A PHP class to parse a Google Spreadsheet to JSON
https://github.com/andrearufo/gsx2json4php
composer google-spreadsheet json parse php
Last synced: about 8 hours ago
JSON representation
A PHP class to parse a Google Spreadsheet to JSON
- Host: GitHub
- URL: https://github.com/andrearufo/gsx2json4php
- Owner: andrearufo
- License: apache-2.0
- Created: 2018-12-23T12:04:00.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-04-29T21:01:59.000Z (over 3 years ago)
- Last Synced: 2024-03-29T13:56:30.770Z (7 months ago)
- Topics: composer, google-spreadsheet, json, parse, php
- Language: PHP
- Size: 9.77 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gsx2json4php
The **gsx2json4php** is a simple PHP class to parse a Google Spreadsheet into a JSON.
This is inspired by https://github.com/55sketch/gsx2json:
> One useful feature of Google Spreadsheets is the ability to access the data as JSON by using a particular feed URL. However, this is a bit fiddly to do, and the resulting JSON is pretty unreadable, with usable data buried deep inside objects.
>
>This API connects to your spreadsheet and santizes the data, providing simple, readable JSON for you to use in your app.## Installing gsx2json4php
The recommended way to install gsx2json4php is through Composer.
```
curl -sS https://getcomposer.org/installer | php
```Next, run the Composer command to install the latest stable version of gsx2json4php:
```
php composer.phar require andrearufo/gsx2json4php
```or
```
composer require andrearufo/gsx2json4php
```After installing, you need to require Composer's autoloader:
```
require 'vendor/autoload.php';
```You can then later update gsx2json4php using composer:
```
php composer.phar update
```## How to use
First, you must publish your spreadsheet to the web, using _File -> Publish To Web_ in your Google Spreadsheet.
Copy your Spreadsheet ID to use into the script:
```php
getJson();```