+ Reply to Thread
Results 1 to 3 of 3

.CSV Files

  1. #1
    Roman
    Guest

    .CSV Files

    My csv file is delimited by commas and text is delimited by ". My file
    considers carriage returns and next line characters enclosed in " as
    text. I am facing a problem when trying to open this file in excel.
    The excel doesn't care that next line character enclosed by " and
    thinks it is the end of a record. Is there a way to excel that
    anything inside " should be treated as text?

    Thanks in advance


  2. #2
    Kurt
    Guest

    Re: .CSV Files


    After playing around with this, it apears Excel uses a linefeed (0x0A)
    within quotes to denote a newline within text in the same cell. So a csv
    file like:

    "This is <0x0A> Cell one", "This is <0x0A> Cell two"

    loads into Excel as


    A | B
    ------------------------
    | This is | This is |
    1| Cell one | Cell two |
    | | |
    -------------------------

    You may have to write a bit of code that will strip the carriage returns
    that occur between quotes.

    ....kurt


    "Roman" <[email protected]> wrote in message
    news:[email protected]...
    > My csv file is delimited by commas and text is delimited by ". My file
    > considers carriage returns and next line characters enclosed in " as
    > text. I am facing a problem when trying to open this file in excel.
    > The excel doesn't care that next line character enclosed by " and
    > thinks it is the end of a record. Is there a way to excel that
    > anything inside " should be treated as text?
    >
    > Thanks in advance
    >




  3. #3
    Roman
    Guest

    Re: .CSV Files

    Thanks for your help. Actually, it should be pretty simple with python
    or save the file in a pc format which would strip the carriage returns.

    Kurt wrote:
    > After playing around with this, it apears Excel uses a linefeed (0x0A)
    > within quotes to denote a newline within text in the same cell. So a csv
    > file like:
    >
    > "This is <0x0A> Cell one", "This is <0x0A> Cell two"
    >
    > loads into Excel as
    >
    >
    > A | B
    > ------------------------
    > | This is | This is |
    > 1| Cell one | Cell two |
    > | | |
    > -------------------------
    >
    > You may have to write a bit of code that will strip the carriage returns
    > that occur between quotes.
    >
    > ...kurt
    >
    >
    > "Roman" <[email protected]> wrote in message
    > news:[email protected]...
    > > My csv file is delimited by commas and text is delimited by ". My file
    > > considers carriage returns and next line characters enclosed in " as
    > > text. I am facing a problem when trying to open this file in excel.
    > > The excel doesn't care that next line character enclosed by " and
    > > thinks it is the end of a record. Is there a way to excel that
    > > anything inside " should be treated as text?
    > >
    > > Thanks in advance
    > >



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1