PHPackages                             kojiro526/php-docxtable - 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. kojiro526/php-docxtable

ActiveLibrary

kojiro526/php-docxtable
=======================

A simple utility to update the table style contained in the docx file.

1.0.0(8y ago)067MITPHPPHP &gt;=5.6.0

Since Jul 5Pushed 8y ago1 watchersCompare

[ Source](https://github.com/kojiro526/php-docxtable)[ Packagist](https://packagist.org/packages/kojiro526/php-docxtable)[ RSS](/packages/kojiro526-php-docxtable/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (3)Versions (5)Used By (0)

テーブルスタイル置換ツール
=============

[](#テーブルスタイル置換ツール)

docxファイル内のテーブルのスタイルを、ファイル内の特定のテーブルスタイルに一括で置換するツールです。

必要要件
----

[](#必要要件)

PHP 5.6 以上

事前の設定
-----

[](#事前の設定)

このコマンドはcomposerでグローバルインストールして使うことを想定しているため、以下のディレクトリにパスを通して下さい。

### Linux, OSX等

[](#linux-osx等)

`.bash_profile`等に以下のパスを設定して下さい。

```
export PATH=$HOME/.composer/vendor/bin:$PATH

```

### Windows

[](#windows)

Windowsでは以下のフォルダを環境変数のPATHに設定して下さい。

```
%USERPROFILE%\AppData\Roaming\Composer\vendor\bin

```

インストール
------

[](#インストール)

```
$ composer global require kojiro526/php-docxtable

```

使い方
---

[](#使い方)

docxファイル内のテーブルスタイルには内部的にIDが割り当てられており、本文内のテーブルのスタイルIDを上書きすれば、テーブルのスタイルを変更できます。

### スタイルIDの確認

[](#スタイルidの確認)

まず、以下のコマンドでdocxファイル内のテーブルスタイルのIDを取得します。

```
$ docxtable-php styles -f ./example.docx
1:
 styleId: a2
 name: Normal Table
2:
 styleId: af5
 name: Table Grid
3:
 styleId: MyTable
 name: MyTable

```

上記の「MyTable」という名前のスタイルに変更したい場合、そのstyleId（"MyTable"）を控えます。

### スタイルIDの変更

[](#スタイルidの変更)

次に、以下のコマンドでdocxファイル内の全てのテーブルのスタイルを"MyTable"というIDで上書きします。

```
$ docxtable-php update -f ./example.docx -s MyTable -o ./output.docx

```

出力先の指定を省略すると、元のファイルを上書きします。

```
$ docxtable-php update -f ./example.docx -s MyTable

```

以上で、テーブルのスタイル変更は完了です。

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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

Every ~35 days

Total

4

Last Release

3129d ago

Major Versions

0.0.3 → 1.0.02017-10-21

### Community

Maintainers

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

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kojiro526-php-docxtable/health.svg)

```
[![Health](https://phpackages.com/badges/kojiro526-php-docxtable/health.svg)](https://phpackages.com/packages/kojiro526-php-docxtable)
```

###  Alternatives

[phan/phan

A static analyzer for PHP

5.6k11.2M1.1k](/packages/phan-phan)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-soap/wsdl

Deals with WSDLs

173.5M12](/packages/php-soap-wsdl)[php-soap/wsdl-reader

A WSDL reader in PHP

212.3M9](/packages/php-soap-wsdl-reader)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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