PHPackages                             sulabh/excel-file-package - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. sulabh/excel-file-package

ActiveLibrary[File &amp; Storage](/categories/file-storage)

sulabh/excel-file-package
=========================

A package to create Excel files from data

v1.1.4(1y ago)236MITPHPPHP &gt;=7.4

Since Mar 27Pushed 1y ago1 watchersCompare

[ Source](https://github.com/sulabh-npl/excel-sheet-package)[ Packagist](https://packagist.org/packages/sulabh/excel-file-package)[ RSS](/packages/sulabh-excel-file-package/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (10)Used By (0)

Excel File Package
==================

[](#excel-file-package)

Excel file package is a composer package used to export data from database to excel sheet with proper heading and formatting of data.

*This is more than 85% Faster than existing Solutions*

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

[](#installation)

Use the package manager [composer](https://getcomposer.org/) to install Excel File Package.

```
composer require sulabh/excel-file-package
```

Usage
-----

[](#usage)

```
require 'vendor/autoload.php';

use Sulabh\ExcelFilePackage\ExcelFile;
use App\Model\User;

// data to be exported, supported format is Laravel's Model.
// You can filter the data as per your need using where conditions;
$data = User::query();

// Number of data you want in a Single Sheet.
// 1 Excel Sheet can store upto 1,048,576 rows,
// so this value should not exceed 1,048,575.
// 1 is for header
$chunk_size = 100000;

// List of headers in each column respectively
$header = ['S.No', 'Name', 'Email', 'Phone Number'];

// No need to use .xlsx, even if entered its filtered by the package
$file_name = "UsersExport";

// Define how the data in export should be displayed
$row_formatter = function($row) {
  return [
    'SERIAL_NO', // This is a wildcard and represents an incremental value, It starts with 1 in every sheet
    $row->first_name." ".$row->last_name,
    $row->email,
    $row->phone_number,
  ];
};

// Optional
$total_count = $data->count();

ExcelFile::createExcelFile($data, $chunk_size, $header, $file_name, $row_formatter, $total_data);
```

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

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance47

Moderate activity, may be stable

Popularity10

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

Total

9

Last Release

394d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/76fb3a4420a4b6121b98333d29a0734e152412636840f6bfa9a16828a9fc8386?d=identicon)[SulabhNpl](/maintainers/SulabhNpl)

---

Top Contributors

[![sulabh-npl](https://avatars.githubusercontent.com/u/48127992?v=4)](https://github.com/sulabh-npl "sulabh-npl (18 commits)")

### Embed Badge

![Health badge](/badges/sulabh-excel-file-package/health.svg)

```
[![Health](https://phpackages.com/badges/sulabh-excel-file-package/health.svg)](https://phpackages.com/packages/sulabh-excel-file-package)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M124](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

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