Problems with "\n" newline in cells

Topics: User Forum
Jun 23, 2010 at 4:54 PM
Edited Jun 23, 2010 at 4:57 PM
I am trying to format a spreadsheet like this:
http://www.partreports.com/template.xlsx

Now, when I place the \n between the values I want "broken", I get this:
http://www.partreports.com/way_it_is.png

This is the way it should be:
http://www.partreports.com/should_be.png


And another thing... When I try opening the file, I get these two dialogs showing:
http://www.partreports.com/first_dialog.png
http://www.partreports.com/second_dialog.png


PHP Version: 5.3.1
PHPExcel Version: 1.7.3c
Coordinator
Jun 29, 2010 at 12:15 PM

Have you tried

// auto-size on row 1
$objWorksheet->getRowDimension('1')->setRowHeight(-1);

Jun 29, 2010 at 5:10 PM

No I didn't, I just set the row height.

If wrapText is set to true, you really should set the autosize the height.

 

However, the new line char still shows if it is included.