How can i make bullets list in PHPExcel

霸气de小男生 提交于 2019-12-19 10:05:29

问题


I was trying to convert the html tags from php to excel using PHPExcel, everything is going alright except that I can't find how to make bulletted list. is this feature exist in PHPExcel? i already scan some of the documentary of PHPExcel but i can't find anything about bullets.

i want to place the bulletted inside one cell

Thank you


回答1:


You simply want a string containing newline characters, and then to set the cell to wrap

$value = "• Foo\n• Bar";
$objPHPExcel->getActiveSheet()
    ->setCellValue('A10', $value);
$objPHPExcel->getActiveSheet()
    ->getRowDimension(10)
    ->setRowHeight(-1);
$objPHPExcel->getActiveSheet()
    ->getStyle('A10')
    ->getAlignment()
    ->setWrapText(true);


来源:https://stackoverflow.com/questions/31932815/how-can-i-make-bullets-list-in-phpexcel

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!