PHPackages                             opencat/filter-xlsx - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. opencat/filter-xlsx

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

opencat/filter-xlsx
===================

Excel (.xlsx) file filter for the OpenCAT Framework

00PHP

Since May 9Pushed 1mo agoCompare

[ Source](https://github.com/shaikhammar/opencat-filter-xlsx)[ Packagist](https://packagist.org/packages/opencat/filter-xlsx)[ RSS](/packages/opencat-filter-xlsx/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

catframework/filter-xlsx
========================

[](#catframeworkfilter-xlsx)

Microsoft Excel XLSX file filter for the [CAT Framework](https://github.com/shaikhammar/cat-framework).

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

[](#installation)

```
composer require catframework/filter-xlsx
```

Requires `ext-dom`, `ext-libxml`, and `ext-zip`.

Usage
-----

[](#usage)

```
use CatFramework\FilterXlsx\XlsxFilter;

$filter = new XlsxFilter();

// Extract translatable segments
$document = $filter->extract('data.xlsx', 'en', 'fr');

foreach ($document->getSegmentPairs() as $pair) {
    $pair->target = new Segment('seg-t', [$translatedText]);
}

// Write the translated XLSX
$filter->rebuild($document, 'data.fr.xlsx');
```

What gets extracted
-------------------

[](#what-gets-extracted)

XLSX stores cell text in two places; the filter handles both:

Storage typeLocation in ZIPNotes**Shared strings**`xl/sharedStrings.xml`Deduplicated across the workbook; only strings actually referenced by cells are extracted**Inline strings**`xl/worksheets/sheet*.xml` (cells with `t="inlineStr"`)Extracted and replaced per cell**Non-translatable strings are skipped automatically**: pure numbers, currency values, percentages, and empty strings are detected by a regex heuristic and omitted from extraction.

Rich-text shared strings (multiple `` runs with different formatting) preserve their formatting as `InlineCode` pairs on the segment.

On rebuild, `xl/calcChain.xml` is deleted so Excel recomputes formula dependencies on next open (avoids stale cell reference errors).

Skeleton format
---------------

[](#skeleton-format)

The skeleton is a temporary XLSX file written to the system temp directory at extract time:

```
['path' => '/tmp/cat-.skl']
```

The skeleton is a copy of the original XLSX ZIP with translatable cell values replaced by `{{SEG:NNN}}` tokens. **Do not delete it** between `extract()` and `rebuild()` calls.

Limitations
-----------

[](#limitations)

- **Formula cells**: cells containing formulas (`=SUM(...)`) are not extracted — only their stored text values if present.
- **Number-format strings**: strings that look purely numeric (digits, commas, currency symbols, `%`) are silently skipped. If a string like `"1,234 units"` should be translatable, it will be skipped due to the numeric heuristic.
- **Worksheet names**: tab names are not extracted.
- **Skeleton lifetime**: the `.skl` temp file must survive between `extract()` and `rebuild()`. For long-lived workflows, persist `$document->skeleton['path']`.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance61

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c6b9044413071860fd6199e56c661a24f449797b77a1b130f0df7e98be8481f4?d=identicon)[shaikhammar](/maintainers/shaikhammar)

---

Top Contributors

[![actions-user](https://avatars.githubusercontent.com/u/65916846?v=4)](https://github.com/actions-user "actions-user (2 commits)")

### Embed Badge

![Health badge](/badges/opencat-filter-xlsx/health.svg)

```
[![Health](https://phpackages.com/badges/opencat-filter-xlsx/health.svg)](https://phpackages.com/packages/opencat-filter-xlsx)
```

###  Alternatives

[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k116.2M670](/packages/symfony-maker-bundle)[consolidation/site-process

A thin wrapper around the Symfony Process Component that allows applications to use the Site Alias library to specify the target for a remote call.

5347.3M9](/packages/consolidation-site-process)

PHPackages © 2026

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