PHPackages                             remember/laravel-spreadsheet - 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. remember/laravel-spreadsheet

ActiveLibrary

remember/laravel-spreadsheet
============================

Based on phpoffice/phpSpreadsheet package in laravel, let developers get started faster

0.0.3(6y ago)3108MITPHPPHP ^7.1CI failing

Since Mar 8Pushed 6y ago1 watchersCompare

[ Source](https://github.com/wuqinqiang/laravel-phpSpreadsheet)[ Packagist](https://packagist.org/packages/remember/laravel-spreadsheet)[ Docs](https://github.com/remember/laravel-phpspreadsheet)[ RSS](/packages/remember-laravel-spreadsheet/feed)WikiDiscussions master Synced 5d ago

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

Quickly generate the specified xlsx file in Laravel
===================================================

[](#quickly-generate-the-specified-xlsx-file-in-laravel)

The reason for the development of this extension is that the business will often generate data in a specific XLSX format export, according to the daily development of some requirements features.integration of general functions, to achieve the requirements through the minimum configuration, do not need to see the corresponding PhpSpreadsheet package documents.However, for some complex requirements, you still need to check the phpspreadsheet documentation.

The environment
---------------

[](#the-environment)

```
php >7.1
Laravel  6.*
phpoffice/phpspreadsheet ^1.11
```

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

[](#installation)

```
composer require remember/laravel-spreadsheet
```

**If there is a lack of extension, please install the extension first**

Publish configuration

```
php artisan vendor:publish --provider="Remember\LaravelPhpSpreadsheet\LaravelPhpSpreadsheetServiceProvider"
```

#### configuration file

[](#configuration-file)

config/laravel-phpSpreadsheet.php

```
/*
 * You can place your custom package configuration in here.
 */
return [
    'startRow' => 2,
    'startLine' => 1,
    //Generate the cell format
    'columns' => [
        //demo
//        'student' => [
//            'fileName' => 'demo123'.time(),
//            'title' => 'demo1',
//            'lineName' => [
//                'name', 'age', 'address',
//            ],
//
//        ],
    ],
    'style' => [
        'format' => [
            //Default horizontal vertical center
            'alignment' => [
                /**
                 * you can set: left、right、 center、 centerContinuous、 justify、 fill
                 */
                'horizontal' => 'center',
                'vertical' => 'center',
            ],
        ],
        //default cell width
        'width' => 15,
        'extra-width' => [
            'A' => 20,
            'B' => 25,
        ],
        //style cell border
        'border' => [
            'A1:B1' => [
                'borders' => [
                    'outline' => [
                        // Border style
                        // borderStyle you can set:
                        // dashDot dashDotDot dashed dotted double hair medium';
                        // 'mediumDashDot mediumDashDotDot mediumDashed slantDashDot thick thin';
                        'borderStyle' => 'thick',
                        'color' => ['argb' => 'FFFF0000'],
                    ],
                ],

            ],

        ]
    ],

];
```

Usage
-----

[](#usage)

if you want the browser to download the data and save it as an Excel file

```
$data = [
            ['wuqinqiang', 23, 'HangZhou'],
            ['curry', 25, 'ShangHai'],
            ['Tom', 30, 'ShenZhen']
        ];
app('laravel-phpSpreadsheet')->downloadFile('student', $data);
```

If you want to save the file,then return file path

```
$path=app('laravel-phpSpreadsheet')->saveFile('student', $data);
return $path;
```

If your data is taken from the database and the data is not easily populated into the specified column.You can just generate one shelf,then populate it yourself.

```
$data = [
            ['name'=>'wuqinqiang', 'age'=>24, 'address'=>'QuZhou'],
            ['name'=>'zhangsan', 'age'=>26, 'address'=>'HangZhou',],
            ['name'=>'lisi', 'age'=>30, 'address'=>'ShenZhen'],
        ];
        $phpSpreadsheet=app('laravel-phpSpreadsheet');
        $sheet= $phpSpreadsheet->init('student');
        $sheet = app('laravel-phpSpreadsheet')->init('student');
        $count=3;
        collect($data)->map(function ($res) use ($sheet, &$count) {
            $sheet->setCellValue('A' . $count, $res['name']);
            $sheet->setCellValue('B' . $count, $res['age']);
            $sheet->setCellValue('C' . $count, $res['address']);
            $count++;
        });
        // save file
       $file= $phpSpreadsheet->saveLocal('student');
       // download
      $phpSpreadsheet->downForBrowser('student');
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

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)

- [wuqinqiang](https://github.com/wuqinqiang)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

3

Last Release

2259d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0f144237509f105d537db9d7c7baf83fdcaa670531105e7af45bb4e2fbab045a?d=identicon)[wuqinqiang](/maintainers/wuqinqiang)

---

Top Contributors

[![wuqinqiang](https://avatars.githubusercontent.com/u/36129334?v=4)](https://github.com/wuqinqiang "wuqinqiang (17 commits)")

---

Tags

rememberlaravel-spreadsheet

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/remember-laravel-spreadsheet/health.svg)

```
[![Health](https://phpackages.com/badges/remember-laravel-spreadsheet/health.svg)](https://phpackages.com/packages/remember-laravel-spreadsheet)
```

###  Alternatives

[maatwebsite/excel

Supercharged Excel exports and imports in Laravel

12.7k144.3M712](/packages/maatwebsite-excel)[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)[watson/rememberable

Query caching for Laravel

1.1k5.2M13](/packages/watson-rememberable)[rennokki/laravel-eloquent-query-cache

Adding cache on your Laravel Eloquent queries' results is now a breeze.

1.1k4.0M14](/packages/rennokki-laravel-eloquent-query-cache)[rtconner/laravel-likeable

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

394388.0k5](/packages/rtconner-laravel-likeable)[christiankuri/laravel-favorite

Allows Laravel Eloquent models to implement a 'favorite' or 'remember' or 'follow' feature.

226471.2k5](/packages/christiankuri-laravel-favorite)

PHPackages © 2026

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