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.

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.