Answer the question
In order to leave comments, you need to log in
How to change the value of a variable in PHPExcel, not a specific cell?
For example, in Word, you can create a test.docx document with the following content:
Имя: ${name}
Фамилия: ${second_name}
Отчество: ${third_name}
$phpWord = new PHPWord();
$template = $phpWord->loadTemplate("test.docx");
$template->setValue("name", "Ivan");
$template->setValue("second_name", "Ivanov");
$template->setValue("third_name", "Ivanovich");
$template->saveAs("newtest.docx");
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question