ottosmops / office2text
Extract text from Microsoft Office (docx, pptx, xlsx) and LibreOffice (odt, odp, ods) documents using PHP and ZipArchive.
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/ottosmops/office2text
Requires
- php: >=8.1
Requires (Dev)
- phpunit/phpunit: >=10
This package is not auto-updated.
Last update: 2025-09-30 10:03:08 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