Created
March 25, 2014 00:49
Maintaining Line Breaks In An HTML-Excel File
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<br style="mso-data-placement:same-cell;" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- Store Excel-HTML output. ---> | |
<cfsavecontent variable="strData"> | |
<table border=".5pt"> | |
<thead> | |
<tr> | |
<th> | |
Degree | |
</th> | |
<th> | |
Year | |
</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr valign="top"> | |
<td> | |
Highschool Diploma | |
<br style="mso-data-placement:same-cell;" /> | |
Hackley School | |
</td> | |
<td> | |
1998 | |
</td> | |
</tr> | |
<tr valign="top"> | |
<td> | |
Bachelor of Science in Computer Science | |
<br style="mso-data-placement:same-cell;" /> | |
Tufts University | |
</td> | |
<td> | |
2002 | |
</td> | |
</tr> | |
</tbody> | |
</table> | |
</cfsavecontent> | |
<!--- Set header for file attachment. ---> | |
<cfheader | |
name="content-disposition" | |
value="attachment; filename=data.xls" | |
/> | |
<!--- Stream the content. ---> | |
<cfcontent | |
type="application/excel" | |
variable="#ToBinary( ToBase64( strData ) )#" | |
/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi bennadel,
Thanks for this article it helps me lot
Also I want to add horizontal line for that I did with hr that but that not work . is it possible for with hr tag or any other way to put horizontal line in same cell