PHPackages                             tadasei/backend-excel-utils - 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. tadasei/backend-excel-utils

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

tadasei/backend-excel-utils
===========================

A package that provides stub utilities for usage with laravel excel

v2.0.1(1mo ago)175MITPHPPHP ^8.1.0

Since Dec 6Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/Tadasei/backend-excel-utils)[ Packagist](https://packagist.org/packages/tadasei/backend-excel-utils)[ RSS](/packages/tadasei-backend-excel-utils/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (10)Dependencies (6)Versions (13)Used By (0)

Tadasei/backend-excel-utils
===========================

[](#tadaseibackend-excel-utils)

This package provides stub utilities for working with [Laravel Excel](https://docs.laravel-excel.com/) or [Fast Excel](https://github.com/rap2hpoutre/fast-excel/). It simplifies the creation of Excel exports by offering pre-built components, including a model for metadata and tracking, as well as traits for custom styles and cell data types.

Features
--------

[](#features)

- **Export Model**:
    Provides metadata and tracking for Excel exports:

    - Export type (linked to the Laravel Excel export class).
    - User requesting the export.
    - Request time and timezone.
    - Processing timestamp (`processed_at`).
    - Integration with [tadasei/backend-file-management](https://github.com/tadasei/backend-file-management) for file metadata.
- **Traits for Laravel Excel Export Classes**:

    - `BoldHeadings`: Adds bold styling to heading cells.
    - `CenteredCells`: Centers the content of cells.
    - `CustomCellDataTypes`: Handles custom cell data types, including the `phoneNumber` type to preserve leading `+` in phone numbers.
- **Artisan Command for Quick Setup**:
    Generates the following stubs ready for customization:

    - **Migration**: `database/migrations/YYYY_MM_DD_HHMMSS_create_exports_table.php`
    - **Model**: `app/Models/Export.php`
    - **Traits**:
        - `app/Traits/BoldHeadings.php`
        - `app/Traits/CenteredCells.php`
        - `app/Traits/CustomCellDataTypes.php`

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

[](#installation)

### Requirements

[](#requirements)

- Laravel (compatible with Laravel Excel and Fast Excel)
- PHP 8.0+
- [tadasei/backend-file-management](https://github.com/tadasei/backend-file-management) `>=1.0.0`

### Steps

[](#steps)

1. Install the package via Composer:

    ```
    composer require tadasei/backend-excel-utils --dev
    ```
2. Run the installation command to generate stubs:

    ```
    php artisan excel-utils:install
    ```

    This will generate:

    - `database/migrations/YYYY_MM_DD_HHMMSS_create_exports_table.php`
    - `app/Models/Export.php`
    - `app/Traits/BoldHeadings.php`
    - `app/Traits/CenteredCells.php`
    - `app/Traits/CustomCellDataTypes.php`

Usage
-----

[](#usage)

### Export Model

[](#export-model)

The `Export` model tracks metadata for your exports and integrates with the `File` model from the `tadasei/backend-file-management` package. Key attributes include:

- **type**: The Laravel Excel export class that triggers the export.
- **user\_id**: The ID of the user who requested the export.
- **requested\_at**: The timestamp of the export request.
- **timezone**: The user's timezone at the time of the request.
- **processed\_at**: A nullable timestamp representing when the export was processed. It remains `null` if the export is pending or in progress.

Feel free to extend or customize the `Export` model to suit your application.

### Traits

[](#traits)

#### 1. **BoldHeadings**

[](#1-boldheadings)

Use the `BoldHeadings` trait in your Laravel Excel export classes to apply bold styling to heading cells. Implement it with Laravel Excel's `styles()` method:

```
use App\Traits\BoldHeadings;

class ExampleExport implements FromCollection, WithStyles
{
    use BoldHeadings;

    // Other methods...
}
```

#### 2. **CenteredCells**

[](#2-centeredcells)

Apply centered alignment to cells using the `CenteredCells` trait:

```
use App\Traits\CenteredCells;

class ExampleExport implements FromCollection, WithStyles
{
    use CenteredCells;

    // Other methods...
}
```

#### 3. **CustomCellDataTypes**

[](#3-customcelldatatypes)

Support custom cell data types with the `CustomCellDataTypes` trait, such as preserving leading `+` in phone numbers:

```
use App\Traits\CustomCellDataTypes;

class ExampleExport implements FromCollection, WithCustomValueBinder
{
    use CustomCellDataTypes;

    // Other methods...
}
```

Customization
-------------

[](#customization)

The generated files are stubs intended as a starting point. You can modify them to better fit your application's requirements.

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

[](#contributing)

Contributions are welcome! If you have suggestions, bug reports, or feature requests, please open an issue on the GitHub repository.

License
-------

[](#license)

This package is licensed under the [MIT License](LICENSE).

###  Health Score

44

—

FairBetter than 91% of packages

Maintenance93

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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 ~48 days

Recently: every ~4 days

Total

12

Last Release

36d ago

Major Versions

v1.4.0 → v2.0.02026-05-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f56b423b676a1de482a2c09129ce3bfd92a62fdad2dedbed6d9837c3fe7f81d?d=identicon)[Tadasei](/maintainers/Tadasei)

---

Top Contributors

[![Tadasei](https://avatars.githubusercontent.com/u/93480860?v=4)](https://github.com/Tadasei "Tadasei (16 commits)")

---

Tags

laravelexcelbackendutils

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tadasei-backend-excel-utils/health.svg)

```
[![Health](https://phpackages.com/badges/tadasei-backend-excel-utils/health.svg)](https://phpackages.com/packages/tadasei-backend-excel-utils)
```

###  Alternatives

[jimmyjs/laravel-report-generator

Rapidly Generate Simple Pdf &amp; Excel Report on Laravel 5 (Using Barryvdh/DomPdf or Barryvdh/laravel-snappy &amp; maatwebsite/excel)

580162.4k1](/packages/jimmyjs-laravel-report-generator)[3x1io/filament-excel

Excel Export for Resources

214.2k1](/packages/3x1io-filament-excel)[samuelterra22/laravel-report-generator

Rapidly Generate Simple Pdf, Excel &amp; CSV Reports on Laravel (Using Barryvdh/DomPdf or Barryvdh/laravel-snappy &amp; maatwebsite/excel)

116.1k](/packages/samuelterra22-laravel-report-generator)

PHPackages © 2026

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