Answer the question
In order to leave comments, you need to log in
How to read .doc file in PhpOffice/PhpWord?
Good evening.
There was a problem reading the .doc file with PhpOffice
Code:
$objReader = IOFactory::createReader('MsDoc');
$phpDoc = $objReader->load($path.'/2.doc');
foreach ($phpDoc->getSections() as $sections) {
$arrsec = $sections->getElements();
foreach ($arrsec as $el) {
if($el instanceof Text){
$body .= $el->getText();
}
}
}
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