How do I ignore newline character/carriage return while importing

G

Guest

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.
 
G

Guest

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 |:>)
 
F

Fredrik Wahlgren

Achal said:
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
 
G

Gord Dibben

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
 
F

Fredrik Wahlgren

Gord Dibben said:
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
 
G

Gord Dibben

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
 
D

Dave Peterson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top