thanks for your advice! But it seems I found another suitable solution. I used PackageExplorer ([url]http://packageexplorer.codeplex.com/[/url]) to analyse my template. And I found that I have to use the IDs of a styling. And I had to set 'strictWordStyles' => true.
[code]
$oPHPDocX = new CreateDocx();
$oPHPDocX->addTemplate( $sUploadPath.'/template/Template.docx' );
$oPHPDocX->importStyles( $sUploadPath.'/template/Template.docx' );
foreach( $aPlaceholders as $sPlaceholder => $sHTMLContent ) {
$oPHPDocX->replaceTemplateVariableByHTML(
$sPlaceholder,
'block',
$sHTMLContent,
array(
'isFile' => false,
'parseDivsAsPs' => true,
'downloadImages' => true,
'wordStyles' =>array(
'<p>' => 'Standard',
'<h1>' => 'berschrift1',
'<h2>' => 'berschrift2',
'<h3>' => 'berschrift3',
'<h4>' => 'berschrift4',
.mytable' => 'Tabellenraster',
),
'strictWordStyles' => true
)
);
}
[/code]
I'v still got some trouble to get the mappings for table cells/headings and listentries working...
[code]
'<th>' => 'Tabellenberschrift',
'<td>' => 'TabellentextArial',
'<li>' => 'Listenabsatz'
[/code]