PHPackages                             zarok13/doc-sheet-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. [File &amp; Storage](/categories/file-storage)
4. /
5. zarok13/doc-sheet-writer

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

zarok13/doc-sheet-writer
========================

Lightweight php library for writing spreadsheets

v1.5.2(4y ago)112MITPHPPHP &gt;=7.4.3

Since Jun 2Pushed 4y ago1 watchersCompare

[ Source](https://github.com/zarok13/doc-sheet-writer)[ Packagist](https://packagist.org/packages/zarok13/doc-sheet-writer)[ RSS](/packages/zarok13-doc-sheet-writer/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

DocSheetWriter
--------------

[](#docsheetwriter)

DocSheetWriter is the lightweight php library for writing spreadsheets.

How to use
----------

[](#how-to-use)

### Installation

[](#installation)

```
composer require zarok13/doc-sheet-writer

```

### Basic Usage

[](#basic-usage)

```
$data = [
    ['name2', 'name2', 'name2'],
    ['data2', 'data2']
];

$writerXLSX = (new DSW('out'))->initWriterXLSX();
$writerXLSX->write($data);
$writerXLSX->complete();

```

### Styling

[](#styling)

For styling could be used at least one of the three components Font, Background, Borders.

```
$data = [
    ['name2', 'name2', 'name2'],
    ['data2', 'data2']
];

$font1 = new Font();
$font1->setColor('ff0000');

$style1 = Styles::generateStyle($font1);

$writerXLSX = (new DSW('out'))->initWriterXLSX();
$writerXLSX->write($data, $style1);
$writerXLSX->complete();

```

### Advanced Usage

[](#advanced-usage)

```
$data = [
    ['name1','name1'],
    ['data1', 'data1', 'data1'],
    ['data1', 'data1']
];
$data2 = [
    ['name2', 'name2', 'name2'],
    ['data2', 'data2']
];

$dataExtra = [
    ['extra']
];

$font1 = new Font();
$font1->setColor('ff0000');

$border1 = new Borders();
$border1->setColor('ff0000');
$border1->setLeftBorder(Borders::TYPE_THIN);
$border1->setRightBorder(Borders::TYPE_THIN);
$border1->setColor('0000ff');
$border1->setTopBorder(Borders::TYPE_THIN);
$border1->setBottomBorder(Borders::TYPE_THIN);

$background1 = new Background();
$background1->setColor('ff0000');

$style1 = Styles::generateStyle($font1);
$style2 = Styles::generateStyle($font1, null, $border1);
$style3 = Styles::generateStyle(null, $background1, $border1);

$sheets = SheetCollection::initSheets(['sh1', 'sh2', 'sh3']);
$writerXLSX = (new DSW('out', $sheets))->initWriterXLSX();

$writerXLSX->write($data);
$writerXLSX->write($data, $style2);
$sheets->setCurrentSheet('sh2');
$writerXLSX->write($data2, $style3);
$sheets->setCurrentSheet('sh3');
$writerXLSX->write($dataExtra, $style1);
$sheets->previousSheet();
$sheets->previousSheet();
$writerXLSX->write($dataExtra);
$sheets->nextSheet();
$writerXLSX->write($data);
$writerXLSX->complete();

```

### Licence

[](#licence)

MIT License

Copyright (c) 2021 zarok13

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

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

Total

4

Last Release

1709d ago

### Community

Maintainers

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

---

Top Contributors

[![zarok13](https://avatars.githubusercontent.com/u/32093786?v=4)](https://github.com/zarok13 "zarok13 (19 commits)")

---

Tags

phpxlsx

### Embed Badge

![Health badge](/badges/zarok13-doc-sheet-writer/health.svg)

```
[![Health](https://phpackages.com/badges/zarok13-doc-sheet-writer/health.svg)](https://phpackages.com/packages/zarok13-doc-sheet-writer)
```

###  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.8M123](/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.7M61](/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)
