Home |
Search |
Today's Posts |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programming Line Breaks into Cells
I found the solution!
I was using the following header in an ASP page to generate an Excel spreadsheet from a database report. ---- Response.ContentType = "application/vnd.ms-excel" Response.AddHeader "content-disposition", "attachment; filename=JPIJobsProfiles.XLS" ---- But the output streamed into excel did not contain any chr(10) line breaks - hence no line breaks in my Excel cell. The solution is two-fold. 1) At the server level use 'Replace(strText, chr(13), "<br /")' to convert chr(10) into "<br /". 2) The problem then is that "<br /" in Excel would split the text over multiple cells. The solution was to use the following style in the ASP page for the '<br' tag: ---- br {mso-data-placement:same-cell;} ---- I found this solution online, but am reposting for the benefit of others. Regards, Wayne C. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Parsing line breaks into separate cells | Excel Discussion (Misc queries) | |||
how do I remove line breaks from several cells? | Excel Discussion (Misc queries) | |||
Removing Manual Line Breaks in Multiple Cells | Excel Discussion (Misc queries) | |||
Line Breaks in cells - Mac OS X Leopard | Excel Discussion (Misc queries) | |||
Line breaks in my cells... | Excel Discussion (Misc queries) |