我目前已经有很大的困难,可以从表格中正确放置一些文本。
我想文字是这样的:
“从计算机分析
计算机名”PHPWord如何将文本分解到表格单元格中?
,它会显示这样的单元格内: “从计算机计算机名解析”
这里我当前的代码:
$table = $section->addTable('myTable');
$table->addRow(300);
$table->addCell(4000)->addImage('logo_sat.png',array ('width'=>100,'align'=>'center'));
$table->addCell(6400, $styleVertical)->addText("Analyse from computer \n $computername", $styleFirstHeader, $styleCenter);
$table->addCell(4000, $styleVertical)->addText("SAT" , $styleFirstHeader, $styleCenter);
$table->addRow(30);
$table->addCell(4000, $styleVertical)->addText("ADR $chantier_code/$analyse_id" , $styleFirstHeader, $styleCenter);
$table->addCell(5200, $styleVertical)->addText("Indice : $indice Date : $analyse_datemaj " , $styleFirstHeader, $styleCenter);
$table->addCell(5200, $styleVertical)->addText("Page : " , $styleFirstHeader, $styleCenter);
我见过$section->addTextBreak([$breakCount], [$fontStyle], [$paragraphStyle]);
的文件内,但它那eems与表格单元格不兼容。
任何想法,我们可以使这个作品?
您是否尝试过加入'CHAR(10)'(回车键)? – WillardSolutions
@EatPeanutButter我在\ n的地方添加了它,它只是写了CHAR(10) – BackTrack57