PHPackages                             ottosmops/office2text - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. ottosmops/office2text

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

ottosmops/office2text
=====================

Extract text from Microsoft Office (docx, pptx, xlsx) and LibreOffice (odt, odp, ods) documents using PHP and ZipArchive.

0.9.0(8mo ago)059MITPHPPHP &gt;=8.1CI passing

Since Sep 1Pushed 8mo agoCompare

[ Source](https://github.com/ottosmops/office2text)[ Packagist](https://packagist.org/packages/ottosmops/office2text)[ RSS](/packages/ottosmops-office2text/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

office2text
===========

[](#office2text)

[![CI](https://github.com/ottosmops/office2text/actions/workflows/ci.yml/badge.svg)](https://github.com/ottosmops/office2text/actions/workflows/ci.yml)[![codecov](https://camo.githubusercontent.com/8862d6d4bf20461907d10898e5234a1063f090a617897a8f07e3b3519f0bb2c0/68747470733a2f2f636f6465636f762e696f2f67682f6f74746f736d6f70732f6f666669636532746578742f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/ottosmops/office2text)[![Software License](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Latest Stable Version](https://camo.githubusercontent.com/4e9e4bcf8d7d0f2ea8df8d7cc52a2764b94778e87a66df50de755e8e47ef7416/68747470733a2f2f706f7365722e707567782e6f72672f6f74746f736d6f70732f6f666669636532746578742f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/ottosmops/office2text)[![Packagist Downloads](https://camo.githubusercontent.com/ffa80a7e45495960cb7a8465de2a88c4d45c97502df7d9397b1b1aa58f3164b7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f74746f736d6f70732f6f666669636532746578742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ottosmops/office2text)

Extract text from Microsoft Office (docx, pptx, xlsx) and LibreOffice (odt, odp, ods) documents using pure PHP (ZipArchive + SimpleXML).

Installation
------------

[](#installation)

With Composer:

```
composer require ottosmops/office2text
```

Usage
-----

[](#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

License
-------

[](#license)

[MIT License](LICENSE.md)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance59

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

260d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/76f31e7e6772db47a91388ed82840fae1fa57185bb82a64924bb3839697222c2?d=identicon)[ottosmops](/maintainers/ottosmops)

---

Top Contributors

[![ottosmops](https://avatars.githubusercontent.com/u/4144389?v=4)](https://github.com/ottosmops "ottosmops (4 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ottosmops-office2text/health.svg)

```
[![Health](https://phpackages.com/badges/ottosmops-office2text/health.svg)](https://phpackages.com/packages/ottosmops-office2text)
```

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[hassankhan/config

Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files

97513.5M170](/packages/hassankhan-config)[meyfa/php-svg

Read, edit, write, and render SVG files with PHP

54613.9M42](/packages/meyfa-php-svg)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
