Package
Spatie Simple Excel
Read and write simple Excel and CSV files
Overview
What Spatie Simple Excel does
Spatie's Simple Excel package simplifies the reading and writing of Excel and CSV files by minimizing memory usage through the use of generators.
This package is particularly useful for developers dealing with large datasets, as it ensures efficient memory handling. Simple Excel leverages Illuminate's LazyCollection, part of the Laravel framework, to process files row by row, which can be vital for performance in resource-constrained environments.
Developers can easily read files by pointing the package at a path, where it distinguishes between Excel and CSV formats based on the file extension. Once configured, it offers various methods to manage headers, including custom header names, use of existing headers, and even handling files without headers.
For those working with multi-sheet Excel documents, Simple Excel provides tools to navigate between sheets, select specific sheets by index or name, and verify the presence of a sheet. This can be particularly useful in scenarios where data is spread across multiple sheets.
The package also incorporates functionality to clean and format data during import. Methods to trim unwanted characters, convert headers to snake_case, and apply custom formatting ensure the imported data meets application requirements. For those utilizing OpenSpout, the package is compatible with versions 4.30 and 5, providing flexibility based on PHP runtime compatibility.
This overview was generated by AI from the package README and may not reflect the latest release.
Read the full README →