如何添加细胞系样式

时间:2018-04-05 06:12:58

标签: phpword

如何添加细胞系样式 框架样式

enter image description here

//創建一個table
$table = $section -> addTable($fancyTableStyleName);
$headTitleNum = array('valign' => 'center','borderSize' => 5,'bgColor' => 'a1ffdb');
$table -> addRow();
$table -> addCell(2100,$headTitleNum) -> addText("");
$table -> addCell(2000,$headTitleNum) -> addText("");
$table -> addCell(1900,$headTitleNum) -> addText("");

1 个答案:

答案 0 :(得分:0)

$fancyTableStyleName = 'Ranking Table';
$fancyTableStyle = array('borderSize' => 5,'borderColor' => '404040','cellSpacing' => 7, 'cellMargin' => 20, 'alignment' => \PhpOffice\PhpWord\SimpleType\JcTable::CENTER);