Download the PHP package wilsonglasser/spout without Composer

On this page you can find all versions of the php package wilsonglasser/spout. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package spout

SpoutX

SpoutX is a fast, low-memory PHP library to read and write XLSX spreadsheet files.

It is a modernized, XLSX-only fork of the (discontinued) Spout library, rebuilt for PHP 8.4+. Unlike Spout and its successor OpenSpout, SpoutX keeps a mutable API on purpose — the reason this fork exists is to let you build up cells, rows and styles imperatively — while adding first-class support for merged cells, comments, formulas with precomputed values, column dimensions/auto-size, auto filters, row heights and custom number formats.


Requirements

Installation

Root namespace is SpoutX\ (no vendor prefix).


Quick start — writing

Quick start — reading

Reader options (call before open()):


Cells and types

A Cell wraps a value; its type is detected automatically and exposed as the CellType enum.

CellType cases: Numeric, String, Formula, Empty, Boolean, Date, Error.

Supported values: string, int, float, bool, \DateTime/\DateInterval, ''/null (empty), and formula strings starting with =.


Styling

Build styles with StyleBuilder and apply them per row (via the row/factory) or per cell.

StyleBuilder methods: setFontBold(), setFontItalic(), setFontUnderline(), setFontStrikethrough(), setFontSize(int), setFontName(string), setFontColor(string), setBackgroundColor(string), setShouldWrapText(bool = true), setShrinkToFit(bool = false), setHorizontalAlign(CellAlignment), setVerticalAlign(CellVerticalAlignment), setBorder(Border), setFormat(string), setNumberFormat(NumberFormat), setRowHeight(float).

Alignment enums

Colors

Named constants (Color::BLACK, WHITE, RED, DARK_RED, ORANGE, YELLOW, LIGHT_GREEN, GREEN, LIGHT_BLUE, BLUE, DARK_BLUE, PURPLE) or build your own:

Borders

Row height

Number format


Extra features (why this fork exists)

These are only available in the XLSX writer. Get the current sheet with $writer->getCurrentSheet().

Merge cells

Auto filter

Column dimensions (width / auto-size / visibility)

Comments

Comment also exposes setWidth(), setHeight(), setMarginLeft(), setMarginTop(), setVisible() and setStyle().

Formulas with a precomputed value

SpoutX does not evaluate formulas — you supply the value Excel should display until it recalculates.

Sheets

Default row style & writer options


Page setup, views, hyperlinks & data validation

These XLSX features were ported from OpenSpout v5 and adapted to SpoutX's mutable, per-sheet model. They are configured on the sheet ($writer->getCurrentSheet()).

Print page setup

Freeze panes / sheet views

Hyperlinks

Data validation (dropdowns and constraints)

Protection, visibility, properties & rich text

Sheet & workbook protection (locks editing, optionally password-guarded)

Tab visibility (independent of protection). lockStructure above is what keeps a hidden tab hidden.

Document properties

Macros (.xlsm): embed the xl/vbaProject.bin of an .xlsm saved by Excel (it is a zip). The VBA project's workbook module must match the workbook code name (ThisWorkbook by default; a pt-BR Excel names it EstaPastaDeTrabalho) and its sheet modules the sheets' code names (SheetN by default). Save with .xlsm.

Rich text (multiple formats in one cell)

Reading merge cells


Migrating from Box\Spout / Spout


Development

The dev environment runs in Docker (PHP 8.4 + ext-zip). Common tasks are wrapped in the Makefile:

The test suite includes a golden-file characterization test (tests/SpoutX/CharacterizationTest.php) that locks the exact XLSX XML output, plus a write→read roundtrip and a feature test covering the extras above.


License

Licensed under the Apache License, Version 2.0. Originally Copyright Box, Inc.; fork maintained by Wilson Glasser.


All versions of spout with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
ext-zip Version *
ext-xmlreader Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wilsonglasser/spout contains the following files

Loading the files please wait ...