ottosmops / office2text
Extract text from Microsoft Office (docx, pptx, xlsx) and LibreOffice (odt, odp, ods) documents using PHP and ZipArchive.
0.9.0
2025-09-01 11:09 UTC
Requires
- php: >=8.1
Requires (Dev)
- phpunit/phpunit: >=10
This package is not auto-updated.
Last update: 2025-09-01 21:04:45 UTC
README
Extract text from Microsoft Office (docx, pptx, xlsx) and LibreOffice (odt, odp, ods) documents using pure PHP (ZipArchive + SimpleXML).
Installation
With Composer:
composer require ottosmops/office2text
Usage
use Ottosmops\Office2text\Extract; $text = (new Extract()) ->document('example.docx') ->text();
Or using the static method:
$text = Extract::getText('example.docx');
Supported formats:
- Microsoft Office: docx, pptx, xlsx
- LibreOffice: odt, odp, ods