PhpSpreadsheet
A powerful pure PHP library for reading and writing spreadsheet files. Work with Excel, OpenDocument, CSV, and more — all from your PHP code.
Quick Start
Get up and running with PhpSpreadsheet in minutes
Key Features
Everything you need to work with spreadsheets in PHP
Multiple File Formats
Read and write Excel (XLSX, XLS), OpenDocument (ODS), CSV, HTML, and more
Formula Engine
Built-in calculation engine with 450+ Excel formula functions
Rich Formatting
Apply styles, fonts, colors, borders, and conditional formatting
Charts & Graphics
Create and embed charts, images, and drawings
Memory Efficient
Optimized for large files with chunked reading and caching
Data Operations
Autofilters, tables, data validation, and defined names
Explore by Topic
Deep dive into specific areas of PhpSpreadsheet
Reading Files
Learn how to read spreadsheet files from various formats into PhpSpreadsheet objects
Read the guide
Writing Files
Export your spreadsheet data to Excel, PDF, CSV, HTML and other formats
Read the guide
Formulas & Calculations
Use Excel formulas and leverage the powerful built-in calculation engine
Read the guide
Styling & Formatting
Apply rich formatting, colors, borders, fonts, and number formats to your cells
Read the guide
Popular Examples
Common use cases and code examples
Hello World
Create your first spreadsheet
Reading Spreadsheets
Load and parse existing files
Styling Cells
Apply formatting and styles
Working with Formulas
Add and calculate formulas
Creating Charts
Generate charts and graphs
Data Validation
Add input validation rules
Ready to get started?
Install PhpSpreadsheet via Composer and start working with spreadsheets in your PHP application today.
View Quickstart Guide
