Removing Carriage returns



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

  • 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: Removing Carriage returns
    ... Author, Mentor, Consultant ... The problem now is that if a carriage return in input ... > in a multi-line textbox, then the csv file is written accordingly. ...
    (microsoft.public.data.ado)
  • .CSV Files
    ... My csv file is delimited by commas and text is delimited by ". ... considers carriage returns and next line characters enclosed in " as ... I am facing a problem when trying to open this file in excel. ...
    (microsoft.public.excel)
  • .CSV Files
    ... My csv file is delimited by commas and text is delimited by ". ... considers carriage returns and next line characters enclosed in " as ... I am facing a problem when trying to open this file in excel. ...
    (microsoft.public.excel.misc)
  • carriage returns after import
    ... I have imported a csv file that contains carriage returns ... in one of the variable fields as well as text. ... i can see them in excel as the little sqares but cannot ...
    (microsoft.public.excel.misc)