Download the PHP package piyush/excel-importer without Composer
On this page you can find all versions of the php package piyush/excel-importer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download piyush/excel-importer
More information about piyush/excel-importer
Files in piyush/excel-importer
Package excel-importer
Short Description A lightweight PHP package to import Excel files (.xlsx and .xls) with data type support
License MIT
Homepage https://github.com/piyushs3001/ExcelReader
Informations about the package excel-importer
Excel Importer
A lightweight PHP package to import Excel files (.xlsx and .xls) with data type support.
Features
- Read .xlsx files (Office Open XML format - Excel 2007+)
- Read .xls files (BIFF format - Excel 97-2003)
- Data type detection: strings, numbers, dates, booleans
- Date conversion: Automatic Excel date to PHP DateTime conversion
- No external dependencies: Pure PHP implementation
- PHP 7.2+ compatible
- Memory efficient: Reads files on demand
- Simple API: Easy to use fluent interface
Requirements
- PHP >= 7.2
- ext-zip (for .xlsx files)
- ext-xml or ext-simplexml (for XML parsing)
Installation
Install via Composer:
Quick Start
API Reference
ExcelReader (Main Entry Point)
Workbook
Worksheet
Row
Cell
Cell Types
| Type | Description | PHP Value Type |
|---|---|---|
string |
Text values | string |
number |
Integer or float | int or float |
date |
Excel date | DateTime |
boolean |
TRUE/FALSE | bool |
empty |
Blank cell | null |
formula |
Calculated value | mixed |
Working with Dates
Excel stores dates as numeric values (days since 1900-01-01). This package automatically converts them to PHP DateTime objects when the cell has a date format.
You can also use the DateHelper directly:
Working with Headers
Convert rows to associative arrays using the first row as headers:
Example: Import to Database
Limitations
- Read-only: This package only reads Excel files, no writing/export capability
- No formula calculation: Only cached/calculated values are read, not the formulas themselves
- Basic merged cell support: Merged cells return value only in the top-left cell
- No image/chart extraction: Only cell data is extracted
- No password protection support: Cannot read encrypted files
License
MIT License. See LICENSE for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
If you encounter any issues, please open an issue on GitHub.
All versions of excel-importer with dependencies
ext-xml Version *
ext-simplexml Version *