PHPackages                             sem-soft/google-sheets - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. sem-soft/google-sheets

ActiveLibrary[API Development](/categories/api)

sem-soft/google-sheets
======================

Wrapper for working with Official Google Sheets API through Google Client Library

1.0.0(6y ago)05BSD-3-ClausePHPPHP &gt;=7.3.0

Since May 25Pushed 6y ago1 watchersCompare

[ Source](https://github.com/sem-soft/google-sheets)[ Packagist](https://packagist.org/packages/sem-soft/google-sheets)[ RSS](/packages/sem-soft-google-sheets/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

GoogleSheets API Base Implementation
====================================

[](#googlesheets-api-base-implementation)

This library implements basic functionality for writing data to Google Sheets document through Service Google Account.

Installation via composer.json
------------------------------

[](#installation-via-composerjson)

```
"sem-soft/google-sheets": "~1.0.0"

```

Usage
-----

[](#usage)

This library use the official [Google Client package](https://github.com/googleapis/google-api-php-client).

### Auth by service aacount

[](#auth-by-service-aacount)

Before use this library we must to configure basic Google Auth Client object for using service account credential file.

```
$auth = new \Sem\GoogleSheets\Auth\ServiceAccountAuthenticator();
$client = $auth->setAuth(new \Google_Client(), '/path/to/Credentials-5c2688ed460a.json');
```

### Middleware objects

[](#middleware-objects)

For writing process we must instantiate some basic objects. Book Object — entity of Google Spreadsheet. Sheet Object — entity of Google Spreadsheet sheet layer. This objects implemets current spreadsheet for writing process.

```
$book = new \Sem\GoogleSheets\Book('193J0l6pRREaQa5632PdD2sCioAJw5AxTV0TWnK0SNH7');
$sheet = new \Sem\GoogleSheets\Sheet('Лист 1');
```

### Writer object

[](#writer-object)

The writer object implements functionality for writing your data to cells, rows and clear ranges in sheets. This object is required book and sheet objects.

```
$writer = new \Sem\GoogleSheets\Writer(
    $client,
    $book,
    $sheet
);
```

### Example for writing data to sheet of the book

[](#example-for-writing-data-to-sheet-of-the-book)

```
$auth = new ServiceAccountAuthenticator();
$client = $auth->setAuth(new \Google_Client(), '/opt/Example-5c1111ed600a.json'));

$writer = new Writer(
    $client,
    new Book('193J0l6pRREaQa5632PdD2sCioAJw5AxTV0TWnK0SNH7'),
    new Sheet('Лист 1')
);
// Clear range
$writer->clearRange('A1:E100');
// Insert row of cells from A2
$writer->insertRow('A2', [
    'Раз',
    'Два',
    'Три'
]);
// Insert row of cells from A3
$writer->insertRow('A3', [
    'Четыри',
    'Пять',
    'Шесть'
]);
// Insert rows of cells from D column and 4 row
$writer->insertRows('D', 4, [
    [
        'Раз',
        'Два',
        'Три'
    ],
    [
        'Четыри',
        'Пять',
        'Шесть'
    ]
]);
// Set cell value
$writer->cell('D12', 'Привет!');
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2547d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4d9af7e5fdcfc54bf68442d0abe5b46d93b5133406d5d1bbbdc16744b31b688b?d=identicon)[sem](/maintainers/sem)

### Embed Badge

![Health badge](/badges/sem-soft-google-sheets/health.svg)

```
[![Health](https://phpackages.com/badges/sem-soft-google-sheets/health.svg)](https://phpackages.com/packages/sem-soft-google-sheets)
```

###  Alternatives

[revolution/laravel-google-sheets

Google Sheets API v4

4483.1M6](/packages/revolution-laravel-google-sheets)[pulkitjalan/google-apiclient

Google api php client wrapper with Cloud Platform and Laravel support

2582.9M5](/packages/pulkitjalan-google-apiclient)[dacastro4/laravel-gmail

Gmail API package for Laravel

312382.9k1](/packages/dacastro4-laravel-gmail)[spotonlive/php-google-my-business

Google MyBusiness

31677.1k](/packages/spotonlive-php-google-my-business)[happyr/google-api-bundle

A Symfony2 Wrapper for the Google APIs Client Library for PHP

48196.1k](/packages/happyr-google-api-bundle)[mediafigaro/google-analytics-api-symfony

Google Analytics API v4 Symfony

46177.7k](/packages/mediafigaro-google-analytics-api-symfony)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
