D
D
David2016-05-31 11:49:51
PHP
David, 2016-05-31 11:49:51

PHP Excel. Who worked with this library? How to stretch a line with zero height?

There is a document prepared as a document template. It should contain information about the order.
The fact is that the document has 40 lines with a zero height, for order positions that need to be stretched (set a height of 20, or auto, for example) and write position data there.
I do in a loop:
$sheet->getRowDimension($row)->setRowHeight(20);
But the height does not change. If you manually stretch, you can see that the data is inserted. Is anyone familiar with a similar problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
coderisimo, 2016-05-31
@coderisimo

Have you tried setting the height to automatic?

foreach($xls->getActiveSheet()->getRowDimensions() as $rd)
 { 
$rd->setRowHeight(-1); 
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question