PHPackages                             aqvador/php\_xlsxwriter - 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. aqvador/php\_xlsxwriter

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

aqvador/php\_xlsxwriter
=======================

PHP Library to write XLSX files

v1.0.0(3y ago)046MITPHPPHP &gt;=5.2.1

Since Oct 23Pushed 3y agoCompare

[ Source](https://github.com/aqvador/PHP_XLSXWriter)[ Packagist](https://packagist.org/packages/aqvador/php_xlsxwriter)[ Docs](https://github.com/mk-j/PHP_XLSXWriter)[ RSS](/packages/aqvador-php-xlsxwriter/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (14)Used By (0)

PHP\_XLSXWriter
===============

[](#php_xlsxwriter)

This library is designed to be lightweight, and have minimal memory usage.

It is designed to output an Excel compatible spreadsheet in (Office 2007+) xlsx format, with just basic features supported:

- supports PHP 5.2.1+
- takes UTF-8 encoded input
- multiple worksheets
- supports currency/date/numeric cell formatting, simple formulas
- supports basic cell styling
- supports writing huge 100K+ row spreadsheets

[Never run out of memory with PHPExcel again](https://github.com/mk-j/PHP_XLSXWriter).

Simple PHP CLI example:

```
$data = array(
    array('year','month','amount'),
    array('2003','1','220'),
    array('2003','2','153.5'),
);

$writer = new XLSXWriter();
$writer->writeSheet($data);
$writer->writeToFile('output.xlsx');
```

Simple/Advanced Cell Formats:

```
$header = array(
  'created'=>'date',
  'product_id'=>'integer',
  'quantity'=>'#,##0',
  'amount'=>'price',
  'description'=>'string',
  'tax'=>'[$$-1009]#,##0.00;[RED]-[$$-1009]#,##0.00',
);
$data = array(
    array('2015-01-01',873,1,'44.00','misc','=D2*0.05'),
    array('2015-01-12',324,2,'88.00','none','=D3*0.05'),
);

$writer = new XLSXWriter();
$writer->writeSheetHeader('Sheet1', $header );
foreach($data as $row)
	$writer->writeSheetRow('Sheet1', $row );
$writer->writeToFile('example.xlsx');
```

50000 rows: (1.4s, 0MB memory usage)

```
include_once("xlsxwriter.class.php");
$writer = new XLSXWriter();
$writer->writeSheetHeader('Sheet1', array('c1'=>'integer','c2'=>'integer','c3'=>'integer','c4'=>'integer') );
for($i=0; $iwriteSheetRow('Sheet1', array($i, $i+1, $i+2, $i+3) );
}
$writer->writeToFile('huge.xlsx');
echo '#'.floor((memory_get_peak_usage())/1024/1024)."MB"."\n";
```

rowstimememory500001.4s0MB1000002.7s0MB1500004.1s0MB2000005.7s0MB2500007.0s0MBSimple cell formats map to more advanced cell formats

simple formatsformat codestring@integer0dateYYYY-MM-DDdatetimeYYYY-MM-DD HH:MM:SStimeHH:MM:SSprice\#,##0.00dollar\[$$-1009\]#,##0.00;\[RED\]-\[$$-1009\]#,##0.00euro\#,##0.00 \[$€-407\];\[RED\]-#,##0.00 \[$€-407\]Basic cell styles have been available since version 0.30

styleallowed valuesfontArial, Times New Roman, Courier New, Comic Sans MSfont-size8,9,10,11,12 ...font-stylebold, italic, underline, strikethrough or multiple ie: 'bold,italic'borderleft, right, top, bottom, or multiple ie: 'top,left'border-stylethin, medium, thick, dashDot, dashDotDot, dashed, dotted, double, hair, mediumDashDot, mediumDashDotDot, mediumDashed, slantDashDotborder-color\#RRGGBB, ie: #ff99cc or #f9ccolor\#RRGGBB, ie: #ff99cc or #f9cfill\#RRGGBB, ie: #eeffee or #efehaligngeneral, left, right, justify, centervalignbottom, center, distributed

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 71.2% 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 ~281 days

Recently: every ~489 days

Total

12

Last Release

1123d ago

Major Versions

0.39 → v1.0.02023-04-14

### Community

Maintainers

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

---

Top Contributors

[![mk-j](https://avatars.githubusercontent.com/u/2347256?v=4)](https://github.com/mk-j "mk-j (116 commits)")[![Radstake](https://avatars.githubusercontent.com/u/1010097?v=4)](https://github.com/Radstake "Radstake (13 commits)")[![andrewkesper](https://avatars.githubusercontent.com/u/14990339?v=4)](https://github.com/andrewkesper "andrewkesper (5 commits)")[![jpastoor](https://avatars.githubusercontent.com/u/733306?v=4)](https://github.com/jpastoor "jpastoor (3 commits)")[![aqvador](https://avatars.githubusercontent.com/u/47603397?v=4)](https://github.com/aqvador "aqvador (3 commits)")[![ivanbarlog](https://avatars.githubusercontent.com/u/2583610?v=4)](https://github.com/ivanbarlog "ivanbarlog (3 commits)")[![GoktugOzturk](https://avatars.githubusercontent.com/u/1000956?v=4)](https://github.com/GoktugOzturk "GoktugOzturk (2 commits)")[![sebastiankalwa](https://avatars.githubusercontent.com/u/8233667?v=4)](https://github.com/sebastiankalwa "sebastiankalwa (2 commits)")[![c-schmitz](https://avatars.githubusercontent.com/u/1364282?v=4)](https://github.com/c-schmitz "c-schmitz (2 commits)")[![Malvineous](https://avatars.githubusercontent.com/u/171656?v=4)](https://github.com/Malvineous "Malvineous (1 commits)")[![marktinsley](https://avatars.githubusercontent.com/u/303598?v=4)](https://github.com/marktinsley "marktinsley (1 commits)")[![ShinyChang](https://avatars.githubusercontent.com/u/1590707?v=4)](https://github.com/ShinyChang "ShinyChang (1 commits)")[![stephane-rouleau](https://avatars.githubusercontent.com/u/27228998?v=4)](https://github.com/stephane-rouleau "stephane-rouleau (1 commits)")[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (1 commits)")[![unamatasanatarai](https://avatars.githubusercontent.com/u/3831251?v=4)](https://github.com/unamatasanatarai "unamatasanatarai (1 commits)")[![EOM](https://avatars.githubusercontent.com/u/1219132?v=4)](https://github.com/EOM "EOM (1 commits)")[![farhantahir](https://avatars.githubusercontent.com/u/15313084?v=4)](https://github.com/farhantahir "farhantahir (1 commits)")[![fliespl](https://avatars.githubusercontent.com/u/1256832?v=4)](https://github.com/fliespl "fliespl (1 commits)")[![fugi](https://avatars.githubusercontent.com/u/4803401?v=4)](https://github.com/fugi "fugi (1 commits)")[![LDAV](https://avatars.githubusercontent.com/u/9531302?v=4)](https://github.com/LDAV "LDAV (1 commits)")

---

Tags

phplibraryexcelxlsxlsx

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/aqvador-php-xlsxwriter/health.svg)

```
[![Health](https://phpackages.com/badges/aqvador-php-xlsxwriter/health.svg)](https://phpackages.com/packages/aqvador-php-xlsxwriter)
```

###  Alternatives

[mk-j/php_xlsxwriter

PHP Library to write XLSX files

1.9k8.1M27](/packages/mk-j-php-xlsxwriter)[avadim/fast-excel-writer

Lightweight and very fast XLSX Excel Spreadsheet Writer in PHP

2951.2M7](/packages/avadim-fast-excel-writer)[avadim/fast-excel-reader

Lightweight and very fast XLSX Excel Spreadsheet Reader in PHP

104608.4k6](/packages/avadim-fast-excel-reader)[avadim/fast-excel-templator

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

20106.6k](/packages/avadim-fast-excel-templator)[maksimovic/php-xlsx-writer

PHP Library to write XLSX files

1143.0k](/packages/maksimovic-php-xlsx-writer)

PHPackages © 2026

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