PHPackages                             enflow/laravel-excel-exporter - 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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. enflow/laravel-excel-exporter

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

enflow/laravel-excel-exporter
=============================

Push Laravel Excel exporters to Google Sheets or Google BigQuery

1.3.0(2mo ago)11.7k↑21.4%[1 PRs](https://github.com/enflow/laravel-excel-exporter/pulls)MITPHPPHP ^8.3CI passing

Since Oct 23Pushed 1w agoCompare

[ Source](https://github.com/enflow/laravel-excel-exporter)[ Packagist](https://packagist.org/packages/enflow/laravel-excel-exporter)[ Docs](https://github.com/enflow/laravel-excel-exporter)[ Fund](https://enflow.nl/contact)[ RSS](/packages/enflow-laravel-excel-exporter/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (2)Dependencies (12)Versions (5)Used By (0)

Push Laravel Excel exports
==========================

[](#push-laravel-excel-exports)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4f29a10cc36aa23cce91d46879ccf8e48299f7514a3dea901e7abe572c6d2756/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656e666c6f772f6c61726176656c2d657863656c2d6578706f727465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/enflow/laravel-excel-exporter)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/1f7428df4ab2799fe946a9670d14028f47fe784de40190de7f962242ac9db86a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656e666c6f772f6c61726176656c2d657863656c2d6578706f727465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/enflow/laravel-excel-exporter)

The `enflow/laravel-excel-exporter` package provides an easy way to push Laravel Excel exports to Google Sheets and Google BigQuery.

Common use-cases include exporting data with Laravel Excel in your application while periodically syncing that same export to a Google Sheet or a Google BigQuery table.

Installation
------------

[](#installation)

You can install the package via Composer:

```
composer require enflow/laravel-excel-exporter
```

Authentication
--------------

[](#authentication)

This package uses the [Google API PHP Client](https://github.com/googleapis/google-api-php-client) under the hood. You will need a Google Cloud project with the correct APIs enabled and a Service Account JSON key.

Create a Service Account JSON key:

1. Go to the [Google Cloud Console](https://console.cloud.google.com/)
2. Create a new project or select an existing project
3. Go to `APIs & Services` &gt; `Credentials`
4. Click `Create Credentials` &gt; `Service account`
5. Enable the APIs you need in the project:
    - For Google Sheets: `Google Sheets API`
    - For Google BigQuery: `BigQuery API`
6. Fill in the required fields and click `Create`
7. Select the created service account and click `Add key` &gt; `Create new key`
8. Select `JSON` and click `Create`
9. The JSON file will be downloaded to your computer
10. Store the downloaded JSON file securely. We recommend `storage/secrets/google-service-account.json`.

Configuration
-------------

[](#configuration)

Publish the config file:

```
php artisan vendor:publish --tag="laravel-excel-exporter-config"
```

Register your exports in the `exports` array:

```
'exports' => [
    // key => Export class (must be resolvable from the container)
    'teams' => \App\Exports\TeamsExport::class,
],
```

You can validate an export by running the push command interactively:

```
php artisan excel-exporter:push
```

### Scheduling

[](#scheduling)

To periodically push all configured exports to their destinations, schedule the `PushAll` command. This will send all defined exports to their configured exporter:

```
use Enflow\LaravelExcelExporter\Commands\PushAll;

$schedule->command(PushAll::class)->dailyAt('03:00')->environments('production');
```

Exporters
---------

[](#exporters)

This package supports two exporters:

### Google Sheets

[](#google-sheets)

Implement the `ExportableToGoogleSheet` interface on your export class and return the target Spreadsheet ID:

```
use Enflow\LaravelExcelExporter\Exporters\GoogleSheet\ExportableToGoogleSheet;

class TeamsExport implements ExportableToGoogleSheet
{
    public function googleSpreadsheetId(): string
    {
        return 'your-spreadsheet-id';
    }

    // ... other export methods
}
```

### Google BigQuery

[](#google-bigquery)

Set the project and dataset in the package config. Then implement `ExportableToGoogleBigQuery` on your export class and specify the table and schema:

```
use Enflow\LaravelExcelExporter\Exporters\GoogleBigQuery\ExportableToGoogleBigQuery;

class TeamsExport implements ExportableToGoogleBigQuery
{
    public function googleBigQueryTableId(): string
    {
        return 'teams';
    }

    public function googleBigQuerySchema(): array
    {
        // column => BigQuery type (e.g. STRING, INT64, FLOAT64, BOOL, TIMESTAMP, DATE)
        return [
            'id' => 'INT64',
            'name' => 'STRING',
            'created_at' => 'TIMESTAMP',
        ];
    }
}
```

Notes:

- Ensure the dataset exists in your BigQuery project. The table will be created or replaced automatically based on the schema you provide.
- Configure `project_id`, `dataset_id`, and service account credentials in `config/excel-exporter.php`.

### BigQuery layout guidance

[](#bigquery-layout-guidance)

Prefer a single dataset with multiple tables per project. Each export class can target a different table via `googleBigQueryTableId()` while sharing the configured dataset.

Console commands
----------------

[](#console-commands)

- `excel-exporter:push` — interactively push one configured export (or via `--export=key`).
- `excel-exporter:push-all` — push all configured exports.

Memory usage
------------

[](#memory-usage)

Excel exports can be memory intensive. You may set `memory_limit` in `config/excel-exporter.php` for the duration of the push.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Michel Bardelmeijer](https://github.com/mbardelmeijer)
- [All Contributors](../../contributors)

About Enflow
------------

[](#about-enflow)

Enflow is a digital creative agency based in Alphen aan den Rijn, Netherlands. We specialize in developing web applications, mobile applications and websites. You can find more info [on our website](https://enflow.nl/en).

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance92

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 68.5% of commits — single point of failure

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

Every ~179 days

Total

2

Last Release

75d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/665ee1919e7c3d12f556cb913d0012a632271f912dc9c3250b7da67d7f3f4b16?d=identicon)[enflow](/maintainers/enflow)

---

Top Contributors

[![mbardelmeijer](https://avatars.githubusercontent.com/u/1583095?v=4)](https://github.com/mbardelmeijer "mbardelmeijer (61 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (18 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (10 commits)")

---

Tags

excelexporterenflow

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/enflow-laravel-excel-exporter/health.svg)

```
[![Health](https://phpackages.com/badges/enflow-laravel-excel-exporter/health.svg)](https://phpackages.com/packages/enflow-laravel-excel-exporter)
```

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[typicms/base

A modular multilingual CMS built with Laravel, enabling developers to manage structured content like pages, news, events, and more.

1.6k20.4k](/packages/typicms-base)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k20](/packages/fleetbase-core-api)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)[slimani/filament-media-manager

A media manager plugin for Filament.

126.9k](/packages/slimani-filament-media-manager)

PHPackages © 2026

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