0

I have a file with a table in it. I loaded it use IOFactory and saved it. I reopened the saved file, the table lines were deleted, each content was placed in different places and it was a mess. if style exists in the table, it throws the following error:

Invalid style value: lrTb Options:btLr,tbRl
 $phpWord = \PhpOffice\PhpWord\IOFactory::load($file);
 $section = $phpWord->getSection(0);
 
 $first_header= $section->addHeader();
 $first_header->firstPage();
 // table codes to be seted for the header on the first page ...

 $all_header= $section->addHeader();
 // table codes to be seted for the header on the other pages ...

 $objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'Word2007');
 $objWriter->save($file);

After loading, even if it does not perform any action, there is such an error. PhpWord version 1.0

0 Answers0