2

When I generate an excel file with large Strings, those won't auto-break and the row height won't be changed as well.

How do I enable auto-breaks and auto-heights in PHPExcel when using a fixed column width?

Large strings currently don't auto-break

Trying this, just changed the height of the row, it didn't wrap the text:

  for ($col = ord('c'); $col <= ord('f'); $col++)
 {
   $worksheet->getColumnDimension(chr($col))->setWidth(25);
   $worksheet->getRowDimension(2)->setRowHeight(100);
   $worksheet->getStyle(chr($col))->getAlignment()->setWrapText(true);
  }
SparklingWater
  • 358
  • 4
  • 15
  • You need to provide a cell address or a range of cell addresses (e.g. `C2` or `C2:E20` to `$worksheet->getStyle()`.... it will not recognise just a row number or column ID as having any meaning – Mark Baker Apr 04 '16 at 11:35

0 Answers0