Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Spout Laravel Package

box/spout

Fast, low-memory PHP library for reading and writing spreadsheet files (CSV, XLSX, ODS). Designed to handle very large files while using under ~3MB RAM. Requires PHP 7.2+, zip and xmlreader extensions. Archived/no longer maintained.

View on GitHub
Deep Wiki
Context7
v3.3.0

Noteworthy changes:

  • [ODS/XLSX] Big performance improvement, mostly related to how Styling is done (thanks @alamirault!)
  • [XLSX] Support for strict OOXML

Fixes:

  • [ALL] Headers setting now follows RFC6266
  • [ODS/XLSX] Floats are no longer stored as locale dependent
  • [XLSX] Spout now supports inline strings with multiple value nodes
  • [XLSX] Fixed skipped cells that were possibly in the wrong order
v3.2.0

Noteworthy changes:

  • [ALL] Support for PHP 7.1 was removed. 7.2 is the oldest version supported now.
  • [ALL] Spout now fully supports PHP 8

Fixes:

  • [ODS] Improved boolean support
v3.1.0

New features:

  • [XLSX] Added support for writing cell formats
  • [XLSX & ODS] Cell alignment

Fixes:

  • [ALL] Cell indexes not being respected when rendering row
  • [XLSX & ODS] Added support for cells in error when writing
  • [XLSX] Support for missing styles XML file
  • [ODS] Added support for whitespaces inside <text:span>
v3.0.1

This version fixes the reading of 1904 dates option.

v3.0.0

Spout v3 is finally out! 🎉🎉🎉🎉🎉🎉

You can check out what changed in the Upgrade guide.

v2.7.3

Improvements:

  • Exposed API to get the last active sheet

Bug fixes:

  • Fixed shared strings XML file using a prefix
  • Fixed shared strings XML Entities auto decode
v2.7.2

Improvements:

  • CSV Reader can now read lines of any length and is not limited to 32768 bytes per line
  • It is now possible to create 2 spreadsheets at the same time and have sheets with the same name. Uniqueness is enforced at the workbook level.
  • Improved error message when an invalid sheet name is set
  • Introduced hard limit on the character count for XLSX cells (32,767 characters)

Bug fixes:

  • Fixed parsing of the XLSX spreadsheet dimensions
  • Fixed reading of ODS sheet names
  • Better support for empty rows in XLSX files
  • Better support for cells with custom inner style/phonetic description in XLSX files
  • Calling close() when a writer is already closed no longer causes an error
v2.7.1
  • Remove control characters to avoid breaking ODS files
  • Fix crash when writing an empty row from an associative array (XLSX)
v2.7.0

Major Enhancements:

  • New option to preserve empty rows when reading
  • New option to disable automatic text wrapping
  • ODS Reader now supports num-rows-repeated attribute

Minor Enhancements:

  • Temporary files are now deleted when an exception is thrown while reading
  • Improve support for custom date formats
  • Empty rows don't get written to file for XLSX Writer

Refactoring:

  • Added internal ReaderOptions
  • Added XMLProcessor to easily process XML files
  • And more...
v2.6.0

New features included in this new version:

  • Added support for background color
  • It is now possible to override the default style for the spreadsheet. This leads to a big perf improvement.
  • Empty cells can now have a custom style applied to them

Fixes:

  • Fix for borders support in Excel 2013+
  • Cells formatted as dates for XLSX files should respect the shouldFormatDate option
  • Extended support for prefixed XML files
  • A few other minor/perf changes
v2.5.0

This new version contains several fixes/improvements:

  • better support for dates:
    • support for cells formatted as time
    • option to return formatted dates instead of PHP objects
  • ODS reader and writer improvements:
    • support for hyperlinks/inline formatting
    • ODS writer now accepts associative arrays (like other writers)
  • Border support!
  • New option to skip BOM addition in CSV file
  • Numerous fixes to not-so-standard XLSX files. Spout now support spreadsheets with:
    • prefixed XML files
    • missing "uniqueCount" and/or "count" attributes in shared strings table
    • missing cell reference in sheet definition
v2.4.4
  • Consistent behavior among all readers when reading cells with leading/ending spaces.
  • Added protection against closing file handles that were not properly created
v2.4.3
  • Fixed an issue when writing boolean values to XLSX files - #175
  • Added optional support for custom stream wrappers (only works with CSV) - #176
  • Fixed an issue when reading CSV files which happen to have a EOL delimiter inside an enclosed text - #183
  • Fixed an issue when reading zeros and empty strings from ODS files - #184
  • XLSX and ODS writers did not properly release the file handle - #190
v2.4.2

Added support for variable EOL in CSV files

v2.4.1
  • Added support for XLSX files that have sheets not defined in order of appearance
  • Fixed bug when parsing large numbers
v2.4.0

Multiple optimizations:

  • empty cells are not written, saving space
  • hot functions have been optimized for better performance

The created files' mime type is now correctly detected. Support for dates beyond 2037.

v2.3.2

This release includes a few improvements:

  • Better support for CSV files with very long lines
  • Reading numeric timestamp in XLSX files now returns a proper date
  • Prevention of folder name conflict when 2 folders are created at exactly the same microsecond
v2.3.1

This release contains 2 fixes:

  • prevent infinite loop for multi-lines CSV when all lines are empty
  • Resolve "Cannot open file" issue occurring on some Windows platforms
v2.3.0

Spout now supports a new document format: ODS! Through the same interface, it is now possible to read CSV, XLSX and ODS files.

Other improvements:

  • explicit error when trying to configure the writer after opening it
  • better support for boolean values in XLSX files
v2.2.0

Fixed bug preventing a XLSX file to be read in iOS and Numbers. Added detection of invalid sheet names (which resulted in an error message when the file was opened in Excel) Added font color support

v2.1.0

Spout now supports styling! It also forces Excel to display multi-line strings correctly, wrapping the text in the cell and breaking it as expected.

v2.0.1

Prevented infinite loop when trying to read a CSV file ending with an empty line

v2.0.0

This version introduces a new way to iterate over the files, moving away from the hasNext() / getNext() method to use PHP iterators and the standard foreach loop. It also unifies the way CSV and XLSX files are read. This change required a major version bump, as it is not backwards compatible.

Version 2.0.0 also brings a few nice additions:

  • Better error handling when processing XML files
  • CSV reader now supports multiple encodings
  • Scrutinizer-CI replaces Coveralls.io and brings very valuable data
v1.1.0

Introduced new caching strategy when extracting shared strings for reading. This should really speed up Spout for small files!

v1.0.11

Fixed XLSX writer on Windows Improved support for cell value types Added code coverage integration through coveralls.io

v1.0.10

Added proper support for all cell types Fixed issue with cells that don't have values Removed version from composer.json

v1.0.9

Added support for files without a sharedStrings.xml file Added support for files containing formulas Updated README

v1.0.8

Fixed issue with ZipArchive and directory separators on Windows

v1.0.7

Improved code coverage Unified interface between Reader and Writer

v1.0.6

Improvements around sheets name:

  • they can be retrieved while reading
  • they can be customized while writing
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
yandex/translate-api
voku/simple_html_dom
league/flysystem-vfs
bkwld/upchuck
filament/spatie-laravel-tags-plugin
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php