Download the PHP package nimmneun/onesheet without Composer
On this page you can find all versions of the php package nimmneun/onesheet. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nimmneun/onesheet
More information about nimmneun/onesheet
Files in nimmneun/onesheet
Package onesheet
Short Description OneSheet is a fast and lightweight single/multi sheet excel/xlsx file writer for PHP 5.4+, PHP 7 & PHP 8 with styling and cell auto-sizing support.
License MIT
Homepage https://github.com/nimmneun/onesheet
Informations about the package onesheet
OneSheet
OneSheet is a simple single/multi sheet excel/xlsx file writer for PHP 5, PHP 7 & PHP 8 with cell auto-sizing and styling support.
What it does
- Write a single/multiple spreadsheet(s) fast and with a small memory footprint.
- Freeze the first [n] rows to have a fixed table header/headline per sheet.
- Use different fonts, styles, borders and background colors on a row level.
- Set your own custom column width per column.
- Autosize column widths to fit cell contents. If no fonts are found, rough estimates are used.
- Define minimum and maximum column widths to keep exceptionally large or small cell contents in check.
What it doesn't
- No cell individualisation, everything is applied at a row level.
- No calculated / formula cells.
- No conditional formatting.
- No number formats.
- No charts.
Install via composer
Manual installation
If you can't or don't want to use composer for some reason, download & extract onsheet and require the file autoload.php from the releases root folder.
Minimal working example
Available Writer operations
Adding font styles
Adding background colors (fills)
Adding borders
Cell auto-sizing
... is cool, but comes with heavy performance impacts - especially when dealing with multibyte characters like ä, ß, Æ, ポ.
Keep in mind though ... you can improve runtimes for larger datasets by disabling it after adding a decent number of rows.
Impacts of autosizing | 100k rows 10 cols 5 chars | 100k rows 10 cols 10 chars | 100k rows 10 cols 20 chars | 100k rows 10 cols 40 chars |
---|---|---|---|---|
Autosizing OFF (Single Byte Chars) | 7.6 seconds | 7.6 seconds | 7.7 seconds | 7.7 seconds |
Autosizing ON (Single Byte Chars) | 9.4 seconds (+23%) | 10.3 seconds (+35%) | 12.4 seconds (+61%) | 16.5 seconds (+114%) |
Autosizing OFF (Multi Byte Chars) | 7.9 seconds | 8.4 seconds | 9.1 seconds | 9.8 seconds |
Autosizing ON (Multi Byte Chars) | 10.7 seconds (+35%) | 13.0 seconds (+54%) | 17.1 seconds (+87%) | 23.3 seconds (+137%) |
Intel Xeon E3-1220, Debian GNU/Linux 9.13, PHP 7.2.27-1+0~20200123.34+debian9~1.gbp63c0bc
Additional examples
Writing to multiple sheets
Issues, bugs, features and ...
Feel free to report any sightings =).
All versions of onesheet with dependencies
ext-zip Version *