OpenOffice Row Heights

Topics: Developer Forum, User Forum
Sep 17, 2009 at 5:52 AM

I'm running OpenOffice 3.0.1 and PHPExcel 1.7

The row height in OpenOffice doesn't seem to adjust to suit font size or text wrapping.

I can set the default font size to 20. But the row height will be the same as if I set it to 10. Similarly with text wrapping.

The row height value is set at -1 which seems correct. And I've tried setting it again to -1.

As in this thread:

Sep 17, 2009 at 9:51 AM

Can you try with latest source code instead of PHPExcel 1.7.0 ?

Sep 21, 2009 at 1:38 AM

Same issue with the latest source code. Running this code:


$phpexcel = new PHPExcel();
$worksheet = $phpexcel->getActiveSheet();

$worksheet->setCellValue('A1',"Oh Hai!\nThis is\nMultiple\nLines");

$objWriter = PHPExcel_IOFactory::createWriter($phpexcel, 'Excel2007');
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header('Content-Disposition: attachment;filename="Test.xlsx"');
header('Cache-Control: max-age=0');
Doesn't change the height to suit the font size or the multiple lines.

Sep 21, 2009 at 2:19 AM

Hmm.. I cannot reproduce this with the latest source code. 3.1.1 with xlsx output: 3.1.1 with xls output:

Maybe my is newer than yours? I weakly recall that 3.0.x had some problems with row heights in Excel files that disappeared when I upgraded to version 3.1.0.

Sep 21, 2009 at 3:03 AM

I've just upgraded to version 3.1.1 and am no longer having the issue.

Thank you!