Use phpexcel to export the table, how to automatically wrap the cell line, that is, there is a lot of text in the database. If you want to enter it into the excel table, you can wrap it. Do not display it on a single line.

what to do with automatic cell line wrapping, that is, there are a lot of text in the database. If you want to enter it into the excel table, you can wrap it. Do not display it on one line

.
Php
Mar.16,2021

one is to have the following code to cooperate

$objPHPExcel->getActiveSheet()->getStyle('A4')->getAlignment()->setWrapText(true);

second, the string to be wrapped must be surrounded by double quotation marks


A fixed width should be enough


set the cell to setWrapText (TRUE);


recommend a feature-rich, compatible, high-performance Excel document base library Excelize: https://github.com/xuri/excelize

.
Menu