PHPackages                             avadim/fast-excel-writer - 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. avadim/fast-excel-writer

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

avadim/fast-excel-writer
========================

Lightweight and very fast XLSX Excel Spreadsheet Writer in PHP

v6.15.0(3w ago)3081.5M↓47.7%395MITPHPPHP &gt;=7.4CI passing

Since Aug 1Pushed 2w ago5 watchersCompare

[ Source](https://github.com/aVadim483/fast-excel-writer)[ Packagist](https://packagist.org/packages/avadim/fast-excel-writer)[ Docs](https://github.com/aVadim483/fast-excel-writer)[ RSS](/packages/avadim-fast-excel-writer/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (12)Versions (101)Used By (5)

**English** | [Русский](README.ru.md)

[![GitHub Release](https://camo.githubusercontent.com/fb5f433082a500652d5fc9db1654419ae4d8171488649dc5152f0b673cdf34b1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f61566164696d3438332f666173742d657863656c2d777269746572)](https://packagist.org/packages/avadim/fast-excel-writer)[![Packagist Downloads](https://camo.githubusercontent.com/7fad055af461c09c9c2a8d65da04e14c06431226e25567b21f7e24b6f7d2f068/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61766164696d2f666173742d657863656c2d7772697465723f636f6c6f723d253233616130306161)](https://packagist.org/packages/avadim/fast-excel-writer)[![GitHub License](https://camo.githubusercontent.com/1dff9a5b8a0198699d363d510d4cdd179c461b070e425d099492d30122a8e689/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f61566164696d3438332f666173742d657863656c2d777269746572)](https://packagist.org/packages/avadim/fast-excel-writer)[![Static Badge](https://camo.githubusercontent.com/ec4898b6661c3fb76d8f5675d6e4162b05a524b1da30c719f4aaa7e15bc8d877/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344372e342d303035666337)](https://packagist.org/packages/avadim/fast-excel-writer)

[![FastExcelWriter Logo](logo/logo2-680.jpg)](logo/logo2-680.jpg)[![fastest](logo/01-feature-fast.jpg)](logo/01-feature-fast.jpg)[![memory saving](logo/02-feature-memory.jpg)](logo/02-feature-memory.jpg)[![multiple worksheet](logo/03-feature-worksheets.jpg)](logo/03-feature-worksheets.jpg)
[![book and sheet protection](logo/04-feature-protection.jpg)](logo/04-feature-protection.jpg)[![multiple charts](logo/05-feature-charts.jpg)](logo/05-feature-charts.jpg)[![styling and image insertion](logo/06-feature-styling.jpg)](logo/06-feature-styling.jpg)

**FastExcelWriter v.6**
=======================

[](#fastexcelwriter-v6)

**FastExcelWriter** is a part of the **FastExcelPhp Project** which consists of

- [FastExcelWriter](https://packagist.org/packages/avadim/fast-excel-writer) - to create Excel spreadsheets
- [FastExcelReader](https://packagist.org/packages/avadim/fast-excel-reader) - to read Excel spreadsheets
- [FastExcelTemplator](https://packagist.org/packages/avadim/fast-excel-templator) - to generate Excel spreadsheets from XLSX templates
- [FastExcelLaravel](https://packagist.org/packages/avadim/fast-excel-laravel) - special **Laravel** edition

Introduction
------------

[](#introduction)

Lightweight, powerful and very fast XLSX Spreadsheet Writer in pure PHP. This library is designed to be super-fast and requires minimal memory usage.

**FastExcelWriter** creates spreadsheets in XLSX format, compatible with MS Excel (Office 2007+), LibreOffice, OpenOffice and others, with many features supported:

- Takes UTF-8 encoded input
- Multiple worksheets
- Supports currency/date/numeric cell formatting, formulas and active hyperlinks
- Supports most styling options for cells, rows, columns - colors, borders, fonts, etc.
- You can set the height of the rows and the width of the columns (including auto width calculation)
- You can add formulas, notes and images in your XLSX-files
- Supports workbook and sheet protection with/without passwords
- Supports page settings - page margins, page size
- Inserting multiple charts
- Supports data validations and conditional formatting

Currently, the required PHP minimum version is PHP 7.4

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

[](#installation)

Use `composer` to install **FastExcelWriter** into your project:

```
composer require avadim/fast-excel-writer

```

Quick Start
-----------

[](#quick-start)

```
use \avadim\FastExcelWriter\Excel;
use \avadim\FastExcelWriter\Style\Style;

$data = [
    ['2003-12-31', 'James', '220'],
    ['2003-8-23', 'Mike', '153.5'],
    ['2003-06-01', 'John', '34.12'],
];

$excel = Excel::create(['Sheet1']);
$sheet = $excel->sheet();

// Write the head row and set styles via fluent interface
$sheet->writeHeader(['Date', 'Name', 'Amount'])
    ->applyFontStyleBold()
    ->applyBorder(Style::BORDER_STYLE_THIN);

// Set column formats and widths
$sheet
    ->setColFormats(['@date', '@text', '0.00'])
    ->setColWidths([12, 14, 8]);

// Write data
foreach ($data as $rowData) {
    $sheet->writeRow($rowData);
}

// Save to a file
$excel->save('simple.xlsx');

// ...or download generated file to client (send to browser)
// $excel->download('simple.xlsx');
```

Documentation
-------------

[](#documentation)

Read more in the documentation [here](/docs/index.md) or [here](https://fast-excel-writer.readthedocs.io/en/latest/). Or check out the [API reference](/docs/90-api-reference.md). Also, you can see examples in `/demo` folder.

Upgrading from an older version? See the [upgrade guide](/docs/09-upgrade.md).

Changelog is [here](CHANGELOG.md).

**FastExcelWriter** vs **PhpSpreadsheet**
-----------------------------------------

[](#fastexcelwriter-vs-phpspreadsheet)

**PhpSpreadsheet** is a perfect library with wonderful features for reading and writing many document formats. **FastExcelWriter** can only write and only in XLSX format, but does it very fast and with minimal memory usage.

**FastExcelWriter**:

- 7-9 times faster
- uses less memory by 8-10 times
- supports writing huge 100K+ row spreadsheets

Benchmark of PhpSpreadsheet (generation without styles)

Rows x ColsTimeMemory1000 x 50.98 sec2,048 Kb1000 x 254.68 sec14,336 Kb5000 x 2523.19 sec77,824 Kb10000 x 50105.8 sec256,000 KbBenchmark of FastExcelWriter (generation without styles)

Rows x ColsTimeMemory1000 x 50.19 sec2,048 Kb1000 x 251.36 sec2,048 Kb5000 x 253.61 sec2,048 Kb10000 x 5013.02 sec2,048 KbDo you want to support FastExcelWriter?
---------------------------------------

[](#do-you-want-to-support-fastexcelwriter)

if you find this package useful you can support and donate to me for a cup of coffee:

- USDT (TRC20) TSsUFvJehQBJCKeYgNNR1cpswY6JZnbZK7
- USDT (ERC20) 0x5244519D65035aF868a010C2f68a086F473FC82b
- ETH 0x5244519D65035aF868a010C2f68a086F473FC82b

Or just give me a star on GitHub :)

###  Health Score

69

—

FairBetter than 100% of packages

Maintenance95

Actively maintained with recent releases

Popularity60

Solid adoption and visibility

Community35

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 92% 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 ~22 days

Recently: every ~14 days

Total

97

Last Release

26d ago

Major Versions

v2.3.10 → v3.0.12022-08-09

v3.1.3 → v4.0.0b2023-06-04

v4.11.0 → v5.0.02024-03-03

v5.8.2 → v6.0.02024-09-22

PHP version history (4 changes)v2.0.0PHP &gt;=7.2

v3.0.1PHP ^7.4||^8.1

v4.0.0bPHP ^7.4|^8.1

v4.1.2PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/bdb51a3c707497a4cc826ec61af31a3f33f2a372d8245e1d17a51be913d1c916?d=identicon)[avadim](/maintainers/avadim)

---

Top Contributors

[![aVadim483](https://avatars.githubusercontent.com/u/2246758?v=4)](https://github.com/aVadim483 "aVadim483 (297 commits)")[![jarrod-colluco](https://avatars.githubusercontent.com/u/94315760?v=4)](https://github.com/jarrod-colluco "jarrod-colluco (6 commits)")[![brainfoolong](https://avatars.githubusercontent.com/u/1684236?v=4)](https://github.com/brainfoolong "brainfoolong (5 commits)")[![xdrew](https://avatars.githubusercontent.com/u/1220667?v=4)](https://github.com/xdrew "xdrew (2 commits)")[![maihcx](https://avatars.githubusercontent.com/u/59072697?v=4)](https://github.com/maihcx "maihcx (2 commits)")[![CristinCebotari](https://avatars.githubusercontent.com/u/68844888?v=4)](https://github.com/CristinCebotari "CristinCebotari (1 commits)")[![davydovks](https://avatars.githubusercontent.com/u/122102646?v=4)](https://github.com/davydovks "davydovks (1 commits)")[![fvxrhj](https://avatars.githubusercontent.com/u/8271208?v=4)](https://github.com/fvxrhj "fvxrhj (1 commits)")[![claspina](https://avatars.githubusercontent.com/u/2287372?v=4)](https://github.com/claspina "claspina (1 commits)")[![JohnChung2002](https://avatars.githubusercontent.com/u/101917927?v=4)](https://github.com/JohnChung2002 "JohnChung2002 (1 commits)")[![maciejstepien-arch](https://avatars.githubusercontent.com/u/234204112?v=4)](https://github.com/maciejstepien-arch "maciejstepien-arch (1 commits)")[![albertbrufau](https://avatars.githubusercontent.com/u/590087?v=4)](https://github.com/albertbrufau "albertbrufau (1 commits)")[![marcelthole](https://avatars.githubusercontent.com/u/850125?v=4)](https://github.com/marcelthole "marcelthole (1 commits)")[![morgverd](https://avatars.githubusercontent.com/u/25158176?v=4)](https://github.com/morgverd "morgverd (1 commits)")[![timshaq](https://avatars.githubusercontent.com/u/62182398?v=4)](https://github.com/timshaq "timshaq (1 commits)")[![clesquir](https://avatars.githubusercontent.com/u/704543?v=4)](https://github.com/clesquir "clesquir (1 commits)")

---

Tags

excelexcelwriterexportexport-excelms-officeofficeparserphpphp-libraryphpexcelspreadsheetsxlsxxlsxwriterphpexportlibraryexcelxlsxlsxspreadsheetPHPExcelMS Officeoffice 2007

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/avadim-fast-excel-writer/health.svg)

```
[![Health](https://phpackages.com/badges/avadim-fast-excel-writer/health.svg)](https://phpackages.com/packages/avadim-fast-excel-writer)
```

###  Alternatives

[avadim/fast-excel-reader

Lightweight and very fast XLSX Excel Spreadsheet and CSV Reader in PHP

105786.0k14](/packages/avadim-fast-excel-reader)[avadim/fast-excel-templator

Lightweight and very fast Excel Spreadsheet generator from XLSX-templates in PHP

21141.4k](/packages/avadim-fast-excel-templator)[avadim/fast-excel-laravel

Lightweight and very fast XLSX Excel Spreadsheet Export/Import for Laravel

4263.3k1](/packages/avadim-fast-excel-laravel)[onurb/excel-bundle

Symfony Bundle to read or write Excel file (including pdf, xlsx, odt), using phpoffice/phpspreadsheet library (replacement of phpoffice/phpexcel, abandonned)

13334.9k](/packages/onurb-excel-bundle)

PHPackages © 2026

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