How can i make bullets list in PHPExcel

后端 未结 1 1966
生来不讨喜
生来不讨喜 2021-01-14 22:47

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 thi

相关标签:
1条回答
  • 2021-01-14 22:57

    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);
    
    0 讨论(0)
提交回复
热议问题