| Package Information |
| Summary |
Efficient and fast xlsx file extension. |
| Maintainers |
Wang Jiexin <
wjx at php dot net >
(lead)
[details]
|
| License |
BSD license |
| Description |
xlswriter is a PHP C Extension that can be used to write text, numbers, formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.
Writer
- 100% compatible Excel XLSX files.
- Full Excel formatting.
- Merged cells.
- Defined names.
- Autofilters.
- Charts.
- Data validation and drop down lists.
- Worksheet PNG/JPEG images.
- Memory optimization mode for writing large files.
- Works on Linux, FreeBSD, OpenBSD, OS X, Windows.
- Compiles for 32 and 64 bit.
- FreeBSD License.
- The only dependency is on zlib.
Reader
- Full read data
- Cursor read data
- Read by data type
- Xlsx to csv |
| Homepage |
https://github.com/viest/php-ext-xlswriter
|
Release notes
Version 2.0.3
(stable)
|
- Feature: autoSize(?string $range = null) sizes columns to fit their content. Column widths are estimated from the written cell values (wide/CJK code points count as two columns) and applied at output() time. Tracking is opt-in (call autoSize() before the writes it should size), so writes that never use it pay no per-cell cost; widths are clamped to Excel's 255 max (#305 / #514). - Performance: worksheet metadata (merges, hyperlinks, protection, row/col options) is now loaded lazily instead of eagerly at openSheet(), so data-only reads (getSheetData / nextRow / nextCellCallback / putCSV) skip the second full XML pass — about 40% faster on large sheets. - Performance: merge-follow lookups (SKIP_MERGED_FOLLOW) are indexed by last_row with a forward cursor, turning the per-cell scan from O(cells × merges) into amortised near-O(1). - Fix: RichString leaked one zend_string per instance (the constructor's zend_string_copy was never released) and its fetch-object offset pointed at the wrong struct; both corrected. - Fix: the cell/row-end/image/comment/chart callback bridges no longer zval_ptr_dtor an uninitialised return value when a callback throws or the call fails. - Fix: xlsx_to_csv leaked its temp row on the write-failure path; openFile() now resets reader bookkeeping the way openSheet() and the dtor do; fileName()/constMemory() handle workbook/worksheet allocation failure instead of dereferencing NULL. - Fix: the reader now reads every image from drawing.xml instead of stopping after the first 64 KB. - Fix: PHP 8.6 compatibility — XtOffsetOf replaced with the standard offsetof, and zval_dtor with zval_ptr_dtor_nogc. - Fix: setColumn()/setRow() leaked the per-call row/col options struct, and insertImage() leaked the path zend_string (#573). |