explaingit

phpoffice/phpexcel

11,378PHPAudience · developerComplexity · 2/5LicenseSetup · moderate

TLDR

Archived PHP library for reading and writing Excel spreadsheets in formats including .xlsx.xls, CSV, and OpenDocument, no longer maintained, use PhpSpreadsheet for new projects.

Mindmap

mindmap
  root((repo))
    What it does
      Read spreadsheets
      Write spreadsheets
      Format cells
    File formats
      Excel xlsx xls
      CSV OpenDocument
      HTML PDF output
    Use cases
      Generate reports
      Import user data
      Format conversion
    Status
      Archived project
      Use PhpSpreadsheet
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Generate Excel files as downloadable reports from a PHP web application with formatted cells and formulas.

USE CASE 2

Import and process data from user-uploaded .xlsx or .csv files on a PHP server.

USE CASE 3

Convert spreadsheet files between formats such as Excel, CSV, HTML, or OpenDocument in a PHP script.

Tech stack

PHP

Getting it running

Difficulty · moderate Time to first run · 30min

Archived, requires PHP 5.2 with zip and xml extensions enabled, use PhpSpreadsheet for any new project.

You can use this in proprietary projects, but any modifications you make to the library itself must be shared under the same LGPL license.

In plain English

PHPExcel is a PHP library that lets web applications read and write spreadsheet files in multiple formats, including Excel (.xls and .xlsx), CSV, OpenDocument Calc (.ods), Gnumeric, HTML, and PDF. It is written in pure PHP with no compiled extensions required for most features, though a few PHP extensions (zip, xml, and optionally the GD image library) must be enabled for full functionality. The library was used in PHP web projects that needed to generate Excel reports, import data from uploaded spreadsheets, or convert between spreadsheet formats. A developer would include it in a project and call its classes to create workbooks, add sheets, write cell values with formatting (fonts, colors, borders, number formats), apply formulas, and then output the result as a file download or save it to disk. Support for reading covers Excel 95 through 2007 formats, SpreadsheetML, OpenDocument, Gnumeric, HTML, SYLK, and CSV. Support for writing covers Excel .xls and .xlsx, HTML, CSV, and PDF (the PDF output requires a third-party library like tcPDF, DomPDF, or mPDF installed separately). This repository is archived and is no longer actively maintained. The README is brief and does not include API documentation or detailed usage examples beyond describing supported file formats and requirements. PHPExcel requires PHP 5.2.0 or higher. Anyone finding this repository today should look for a more recent alternative, as both the library and the PHP version it targets are many years past their active support windows. The license is LGPL (GNU Lesser General Public License), which allows use in proprietary projects as long as modifications to the library itself are shared.

Copy-paste prompts

Prompt 1
Using PHPExcel, write PHP code to create an Excel file with three sheets, bold headers, and a SUM formula in the last row of each sheet.
Prompt 2
Show me how to read an uploaded .xlsx file with PHPExcel and return all cell values from the first sheet as a PHP array.
Prompt 3
How do I apply font colors, background fills, and border styles to a range of cells using PHPExcel?
Open on GitHub → Explain another repo

← phpoffice on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.