Re: Removing Carriage returns



I consulted my IBM green card and it says 0x0A is a line feed and 0x0D is a
carriage return. VBCRLF is the pair together.
hth

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

"Steve Wolfie" <stevewolfie@xxxxxxxxxxxxxxxx> wrote in message
news:%23uVuuSReFHA.640@xxxxxxxxxxxxxxxxxxxxxxx
> Hello All:
>
> In response to the question I posted 6/17, I have followed the advice of
> the very helpful people in this forum, and found that the suggestion for
> importing from a dataset into excel is best done by writing a .csv file
> with a streamwriter. Thanks for that.
>
> However, I have a new problem. the dataset contains input from textboxes
> in an asp.net page. The problem now is that if a carriage return in input
> in a multi-line textbox, then the csv file is written accordingly. I
> already used the textbox1.replace("," , "") method to strip out the commas
> in the file, so that it would not cause excel to advance to the next
> column, but i need to know how to stop the carriage returns from being
> written to the sql database in the first place.
>
> So... What is the character for carriage return? I want to write it
> similar to this.
>
> SqlDataAdapter1.insertcommand.parameters("@comments").value =
> txtcomments.text.replace("CARRIAGE RETURN", " ")
>
> Problem is... what am i supposed to use where I have written carriage
> return above?
>
> Thanks a million.
>
> Steve
>
>


.



Relevant Pages

  • Removing Carriage returns
    ... multi-line textbox, then the csv file is written accordingly. ... file, so that it would not cause excel to advance to the next column, but i ... need to know how to stop the carriage returns from being written to the sql ...
    (microsoft.public.data.ado)
  • Re: CSV file convert
    ... replace the unrecognized carriage returns with real paragraph marks. ... try converting to a table. ... CSV file, load into Word, select all and then convert text to table. ... My CSV file contains commas to seperate each field but the last field ...
    (microsoft.public.word.docmanagement)
  • Re: problems parsing CSV file
    ... Excel is different again. ... irregularity in the CSV file. ... >My first guess was that there was a comma, quote mark or carriage return ... >of these records and which ones piggyback and which ones don't. ...
    (microsoft.public.access.externaldata)
  • Re: Openning an .csv file
    ... I add the Carriage returns (hex-13), ... Does each line of your CSV file end with a carriage return/line feed? ... > Dave Peterson ...
    (microsoft.public.excel.misc)
  • Re: Removing rogue ciarraige returns in data file
    ... > I'm having a hard time with a CSV file that has carriage returns in a postal ... there are empty lines or lines with no commas. ...
    (comp.unix.shell)