' . $GLOBALS['lang']->getLang('str_birthdate') . ' ' . htmlspecialchars($survey->getBirthdate()) . '
'); $this->embedHTML('' . $GLOBALS['lang']->getLang('str_filled_in_date') . ' ' . htmlspecialchars($survey->getCreation()) . '
'); $this->embedHTML('' . $GLOBALS['lang']->getLang('str_answers') . '
'); foreach ($answers as $answer) { $this->embedHTML('' . ($this->getLanguage() == 'nl') ? htmlspecialchars($answer[0]->getQuestion()->getCodeNlBE()) : htmlspecialchars($answer[0]->getQuestion()->getCodeFrBE()) . '
'); foreach ($answer as $ans) { $color = ($ans->getAttention() == 'Y') ? 'FF0000' : '000000'; $name = ($this->getLanguage() == 'nl') ? $ans->getNameNlBE() : $ans->getNameFrBE(); $listArray[$ans->getQuestion()->getId()][] = $this->addText(htmlspecialchars($name), array( 'color' => $color ) ); } $this->addList($listArray[$answer[0]->getQuestion()->getId()]); } //$this->embedHTML('' . htmlspecialchars($GLOBALS['lang']->getLang('str_details_message')) . '
'); $this->createDocxAndDownload('/tmp/report_' . htmlspecialchars($survey->getFirstname()) . ' ' . htmlspecialchars($survey->getLastname())); unlink('/tmp/report_' . htmlspecialchars($survey->getFirstname()) . ' ' . htmlspecialchars($survey->getLastname()) . '.docx'); } This is how i make the docx export