bbcac Posted May 4, 2010 Share Posted May 4, 2010 Wow, that must be the most confusing title in the world I have a PHP snippet that takes an HTML table and saves to a text file with an XLS exension. This works great for getting the HTML table into XLS. It then puts a button on the page for the user to download the xls file. This all works great except when one of by cells contians a new line in it. What I mean is, there is cell which has line breaks in in. I need for this to all be contained in one cell. In HTML this is easy, as I can just put a <br/> after each line, however when I save this as an XLS through php the <br/> causes a new cell to be used instead of a new line a the same cell. Link to comment https://forums.phpfreaks.com/topic/200742-php-to-save-html-as-xls-with-new-lines-in-a-cell/ Share on other sites More sharing options...
ignace Posted May 5, 2010 Share Posted May 5, 2010 Try changing <br/> to \n Link to comment https://forums.phpfreaks.com/topic/200742-php-to-save-html-as-xls-with-new-lines-in-a-cell/#findComment-1053429 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.