+ Reply to Thread
Results 1 to 7 of 7

How do I ignore newline character/carriage return while importing

  1. #1
    Achal
    Guest

    How do I ignore newline character/carriage return while importing

    I am using Excel 2003.
    I need to import a comma delimited file into an excel sheet.
    While importing into an excel sheet I need to ignore some carriage
    returns/newline characters. I tried using double quotes (") but this doesn't
    ignore newline charcters.
    Sample file is as follows
    1,name,description
    details
    2,name,description details
    3,name,description details
    In the above I need to ignore the carriage retun of the 1st record and
    display the 'description details' in one column.

  2. #2
    CyberTaz
    Guest

    RE: How do I ignore newline character/carriage return while importing

    AFAIK there is nothing about Excel's importing feature that provides for
    variable random carriage returns. I'm certain that there are a number of VBA
    solutions, but I would first try to edit the extra paragraph breaks out using
    Word's Find & Replace feature.

    HTH |:>)

    "Achal" wrote:

    > I am using Excel 2003.
    > I need to import a comma delimited file into an excel sheet.
    > While importing into an excel sheet I need to ignore some carriage
    > returns/newline characters. I tried using double quotes (") but this doesn't
    > ignore newline charcters.
    > Sample file is as follows
    > 1,name,description
    > details
    > 2,name,description details
    > 3,name,description details
    > In the above I need to ignore the carriage retun of the 1st record and
    > display the 'description details' in one column.


  3. #3
    Fredrik Wahlgren
    Guest

    Re: How do I ignore newline character/carriage return while importing


    "Achal" <Achal@discussions.microsoft.com> wrote in message
    news:DEA4FD8F-6D9B-4F16-9C52-8F00FDF53F61@microsoft.com...
    > I am using Excel 2003.
    > I need to import a comma delimited file into an excel sheet.
    > While importing into an excel sheet I need to ignore some carriage
    > returns/newline characters. I tried using double quotes (") but this

    doesn't
    > ignore newline charcters.
    > Sample file is as follows
    > 1,name,description
    > details
    > 2,name,description details
    > 3,name,description details
    > In the above I need to ignore the carriage retun of the 1st record and
    > display the 'description details' in one column.


    It seems to me as if you are trying to solve a symptom rather than a
    problem. The question that should be asked is how did the carriage character
    get there in the first place.

    /Fredrik



  4. #4
    Gord Dibben
    Guest

    Re: How do I ignore newline character/carriage return while importing

    Achal

    After import you could try Edit>Replace

    what: ALT + 0010(or 0013).....use the numpad to enter the 0010

    with: nothing

    Replace all.


    Gord Dibben Excel MVP

    On Wed, 23 Mar 2005 09:09:02 -0800, "Achal" <Achal@discussions.microsoft.com>
    wrote:

    >I am using Excel 2003.
    >I need to import a comma delimited file into an excel sheet.
    >While importing into an excel sheet I need to ignore some carriage
    >returns/newline characters. I tried using double quotes (") but this doesn't
    >ignore newline charcters.
    >Sample file is as follows
    >1,name,description
    >details
    >2,name,description details
    >3,name,description details
    >In the above I need to ignore the carriage retun of the 1st record and
    >display the 'description details' in one column.



  5. #5
    Fredrik Wahlgren
    Guest

    Re: How do I ignore newline character/carriage return while importing


    "Gord Dibben" <gorddibbATshawDOTca> wrote in message
    news:s8h341ps6ebscr6v8ml8otuthcta8ihcsi@4ax.com...
    > Achal
    >
    > After import you could try Edit>Replace
    >
    > what: ALT + 0010(or 0013).....use the numpad to enter the 0010
    >
    > with: nothing
    >
    > Replace all.
    >
    >


    This will remove all carriage returns, right? Won't Excel try to put all the
    data in one row? Is there an option in the import wizard that tells excel to
    insert every n'th record on a new row?

    /Fredrik



  6. #6
    Gord Dibben
    Guest

    Re: How do I ignore newline character/carriage return while importing

    Fredrick

    The import wizard will put records on one row.

    There is no provision for inserting every n'th record on a new row AFAIK.

    Perhaps OP could try the wizard and use both comma delimited and "other" with
    ALT + 0010 entered in that box?


    Gord Dibben Excel MVP

    On Wed, 23 Mar 2005 21:16:41 +0100, "Fredrik Wahlgren"
    <fredrik.p.wahlgren@mailbox.swipnet.se> wrote:

    >
    >"Gord Dibben" <gorddibbATshawDOTca> wrote in message
    >news:s8h341ps6ebscr6v8ml8otuthcta8ihcsi@4ax.com...
    >> Achal
    >>
    >> After import you could try Edit>Replace
    >>
    >> what: ALT + 0010(or 0013).....use the numpad to enter the 0010
    >>
    >> with: nothing
    >>
    >> Replace all.
    >>
    >>

    >
    >This will remove all carriage returns, right? Won't Excel try to put all the
    >data in one row? Is there an option in the import wizard that tells excel to
    >insert every n'th record on a new row?
    >
    >/Fredrik
    >



  7. #7
    Dave Peterson
    Guest

    Re: How do I ignore newline character/carriage return while importing

    If you can get to the program that generates that CSV file, maybe you can have
    them replace the linefeeds within each field with some unique and unused
    character--like $.

    Then import your data and change the $'s back to linefeeds.

    If you can't get to that program, maybe you can fix the data after importing it.

    If those numbers are actually numbers (not line/record numbers), then you could
    look for a number in column A. If it's not a number, then it must be associated
    with the description field (column C???). Then merge all those together.

    But it really depends on if you can isolate the type of record.

    Achal wrote:
    >
    > I am using Excel 2003.
    > I need to import a comma delimited file into an excel sheet.
    > While importing into an excel sheet I need to ignore some carriage
    > returns/newline characters. I tried using double quotes (") but this doesn't
    > ignore newline charcters.
    > Sample file is as follows
    > 1,name,description
    > details
    > 2,name,description details
    > 3,name,description details
    > In the above I need to ignore the carriage retun of the 1st record and
    > display the 'description details' in one column.


    --

    Dave Peterson

+ 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