carriage return in excel sheet

Topics: Developer Forum, User Forum
Aug 6, 2009 at 8:19 AM

Hi Guys,

I am working on implementing the PHPExcel in my application where the data from mysql gets exported in Excel sheet using Excel5.

But in my data, I have some line breaks in the description. But when I export the data , it gets exported successfully to the excel sheet. Bu the cell in which this description

gets displayed contains line feed characters (one square).

 

Can you help me please how to convert this characters into line break?

Thanks

Developer
Aug 6, 2009 at 11:58 PM

Can you help me please how to convert this characters into line break?

The correct way achieve newline is to use the "\n" character (not "\r\n" or "\r") and at the same time apply wrapText:

http://phpexcel.codeplex.com/Thread/View.aspx?ThreadId=32427

Since the data is not showing up properly in the Excel file, try to inspect the MySQL data and find out what characters it contains for newlines.