I need to export data from a table to a Word file using the PhpWord's cloneRow.
need help
function Row_CustomAction($action, $row) {
require_once("PHPWord.php");
$PHPWord = new PHPWord();
$document->cloneRow('DataRow', 2);
$document->setValue('DataRow#1', 'A');
$document->setValue('DataRow#2', 'B');
$document->save('/''.docx');
}
Save fine, but when you open the file message (Unfortunately, the file could not be opened due to problems with its contents).