PHPword ライブラリを使用して既存の.docx
ファイルを形成していますが、元のドキュメントの特定の項目しか置き換えることができませんでした。私は実際にドキュメント全体のスタイルを変更したいと考えています。誰でもこれを達成する方法を教えてください。
私のコード:
<?php
require_once 'phpWord/PHPWord.php';
$PHPWord = new PHPWord();
$document = $PHPWord->loadTemplate('test.docx');
$test = 'Indian';
// Replacing The word 'British' with 'Indian'
$document->setValue('British', $test);
$document->save('test2.docx');
?>
ありがとうございました。