HTML to Text - unwanted carriage returns added
I have a created an ASP which lists comma delimetered records onto a webpage. Each record (which would by a long comma delimetered string) is printed in a separate line.
I want the user to be able to save this to a text file using the browser's File -> Save As function (and selecting Text as file type), so it can be loaded into Excel.
However, when this text file is saved through the browser, unwanted carriage returns are added in the long strings, so a record is unnecessarily split into two. The carriage returns are added after the last space before the text becomes too long. I only want the CR at the end of a string, and NOT during the string.
Does anyone know, if there's an option in IE, so these unwanted CR's are avoided when a HTM is exported to a text file?
Thanks.
Re: HTML to Text - unwanted carriage returns added
Maybe I'm wrong but I'm thinking the problem isn't an IE problem but rather is either a formatting or, subsequent to the file being saved, a text editor setting problem - i.e. wordwrap is turned on and then the document is saved again. I know I have removed all line breaks/carriage returns from an html document and IE's source shows the entire page as being a single line.
Anywho, IE should display/save the file with the lines as long as you desire. Depending upon exactly how you are serving the page perhaps you either need to add "<nobr></nobr>" tags around each displayed line or by enclosing the entire text protion of the page in "<pre></pre>" tags?