ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I ignore newline character/carriage return while importing (https://www.excelbanter.com/excel-discussion-misc-queries/18906-how-do-i-ignore-newline-character-carriage-return-while-importing.html)

Achal

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.

CyberTaz

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.


Fredrik Wahlgren


"Achal" wrote in message
...
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



Gord Dibben

Achal

After import you could try EditReplace

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



Fredrik Wahlgren


"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Achal

After import you could try EditReplace

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



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

On Wed, 23 Mar 2005 21:16:41 +0100, "Fredrik Wahlgren"
wrote:


"Gord Dibben" <gorddibbATshawDOTca wrote in message
.. .
Achal

After import you could try EditReplace

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



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.

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


All times are GMT +1. The time now is 07:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com