Jump to content

PHP to save HTML as XLS with new lines in a cell


bbcac

Recommended Posts

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.

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.