Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Hard Enter in one column values

Hi,
I am trying to convert XLS to CSV and then load to Oracle. But in XLS i
have some field value with Carriage Return. So it is making new records. Is
there anyway i can do while converting? I have couple of them coming
frequently.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 104
Default Hard Enter in one column values

Select your data in Excel, then fire up the VBA Editor (Alt+F11).
Copy following line to the "Immediate" Window and push Enter:
Selection.Replace Chr(10), " "

This will replace all Carriage Returns in the selection with a Space
(substitute " " with "" if you just want to remove).

If you need to do this regularly, you can put it into a proper macro:

Sub RemoveReturns()
Selection.Replace Chr(10), " "
End Sub

Cheers,

Joerg Mochikun

"Unnati" wrote in message
...
Hi,
I am trying to convert XLS to CSV and then load to Oracle. But in XLS i
have some field value with Carriage Return. So it is making new records.
Is
there anyway i can do while converting? I have couple of them coming
frequently.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Hard Enter in one column values

You could also do the change via the user interface.

Select the range to fix
Edit|replace
what: ctrl-j
with: (space character)
replace all

========
I don't use oracle, but if it supports newlines in its fields, you may want to
change the alt-enter to a unique character (like a |). Import this data into
Oracle and then do something(?) in oracle to change that character back to a
linefeed.

Unnati wrote:

Hi,
I am trying to convert XLS to CSV and then load to Oracle. But in XLS i
have some field value with Carriage Return. So it is making new records. Is
there anyway i can do while converting? I have couple of them coming
frequently.


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to find duplicate values in a column during enter the value? kesav Excel Discussion (Misc queries) 0 July 18th 08 06:37 AM
How do I enter a Hard Return inside a cell? EHS Excel Discussion (Misc queries) 8 July 8th 08 02:32 PM
How do I insert a hard break (alt enter) in a concatenated string Alphafiction Excel Discussion (Misc queries) 5 February 24th 07 08:11 PM
Convert Hard-coded cell values to constants Takeadoe Excel Discussion (Misc queries) 2 May 20th 06 12:59 AM
Hard values to convert to number Guilherme Loretti Excel Discussion (Misc queries) 4 May 9th 06 11:14 PM


All times are GMT +1. The time now is 10:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"