Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turn Excel line break into <br>

Tags:

excel

A client sent me a huge list of product name and descriptions. The Description cells have text wrap and many line breaks. I need to import this into a MySQL which I do through Navicat Premium.

The problem is that the description cell is used as the HTML description of each product page.

Is there a way to replace Excel's line break with the <br> either in the same Excel file or by a php function?

like image 252
Juan Ignacio Avatar asked May 24 '11 20:05

Juan Ignacio


1 Answers

A little bit of ASCII coding will go a long way.

Set up the find/replace dialogue (Ctrl-H). In the Find field, hold down the Alt key and type 010 from the numeric key pad. (This lets you find a linefeed character.) In the replace field, put your <br>.

like image 140
rajah9 Avatar answered Oct 10 '22 10:10

rajah9