PHPOffice
PHPOffice contains libraries which permits to write and read files from most office suites.
Alternatives
Tech stack
No tech stack added yet. Sign in to suggest some
Note: The official website could not be fetched this time, so the following content is compiled from known information about the project. For specific versions, licenses and feature details, please refer to each repository's documentation.
Overview
PHPOffice is an open-source organization on GitHub that maintains several libraries written in pure PHP. With these libraries, you can read, generate and modify common office documents directly from PHP applications, without installing Microsoft Office or LibreOffice.
Main projects
- PhpSpreadsheet: Reads and writes spreadsheets in formats such as Xlsx, Xls, Ods and CSV, and handles cell styles, formula calculation, charts and multiple worksheets. It is the successor to the earlier PHPExcel project, which is no longer maintained. PhpSpreadsheet is released under the MIT license.
- PHPWord: Creates, reads and writes word processing documents, supporting formats such as Word (DOCX), ODT, RTF and HTML. It handles paragraphs, tables, images, headers and footers, and can also replace content based on templates.
- PHPPresentation: Creates, reads and writes presentations, supporting formats such as PowerPoint (PPTX) and ODP.
- The organization also hosts other repositories related to office documents, such as PHPProject.
Target users and use cases
It is suited to PHP developers who need to process office documents automatically on the server side, for example exporting reports from a web application, generating contracts or invoices in bulk, or importing Excel data uploaded by users.
Key strengths
- Pure PHP implementation with no dependency on external office software
- Object-oriented API, with documentation and examples
- Active community; often used by extension packages for frameworks such as Laravel and Symfony
- Open source and free
Installation
Install via Composer, for example:
composer require phpoffice/phpspreadsheet
composer require phpoffice/phpword
composer require phpoffice/phppresentation
Technical requirements
- A reasonably recent PHP version is required; see each repository's documentation for specifics
- PHP extensions such as zip, xml and gd usually need to be enabled
- Memory usage is high when processing large files; consider optimizations such as cell caching
Discover more
Digislides
Create multimedia presentations in a quick and easy way. (documentation in French).
Aimeos
E-commerce framework for building custom online shops, market places and complex B2B applications scaling to billions of items with Laravel.
Collabora Online Development Edition
Collabora Online Development Edition (CODE) is a powerful LibreOffice-based online office that supports all major document, spreadsheet and presentation file formats, which you can integrate in your own infrastructure.
Contao
Powerful CMS that allows you to create professional websites and scalable web applications.
CryptPad
Collaboration suite built to enable collaboration, synchronizing changes to documents in real time.
Etherpad
Highly customizable online editor providing collaborative editing in real-time.