saving as csv newline inserted

Hi

I have an excel (xls) file which I open with scalc (5.3)
and save it as csv

Unfortunately it looks like

Field1,Field2,Field3,Field4,Field5
"Name","05329954A
           ",0.55,0.75,1.3

Instead of

Field1,Field2,Field3,Field4,Field5
"Name","05329954A ",0.55,0.75,1.3

The reason is that in the first column there is a after name a space
which is translated to a newline when exporting.

How can I get rid of this unwanted newline?
I tried to format the cells but it seemed not to have worked.
Thanks

Uwe Brauer

It appears that the actual contents of Field2 = 05329954A\n where '\n' is a
RETURN (not a TAB). I was able to remove the \n by (1) select/highlight
the column containing Field2, (2) open Data > Text to Columns, (3) Under
'Separator Options' set Y=Separated by, Y=Other as \n then click 'OK'. Now
save as CSV.

Hi Uwe and all:

  I suggest:

a) Open the file as is: csv
b) Mark the column that content all the information
c) Use: Menu, Edit, Search and Replace ... click there
d) In the window opened: In the first row for input what to search,
input and "space" with spacebar
e) In the second row for input what to replace, keep without input
f) Apply the option Replace All
g) Now if all is good, you are eliminate the space after "name" field
h) Save the file again as csv
i) Now you can close the file and open again or use the option: Menu,
Data, Text to Column to split the fields in the column

I hope this help,

"Bruce" == Bruce Hohl <brucehohl@gmail.com> writes:

   > It appears that the actual contents of Field2 = 05329954A\n where '\n' is a
   > RETURN (not a TAB). I was able to remove the \n by (1) select/highlight
   > the column containing Field2, (2) open Data > Text to Columns, (3) Under
   > 'Separator Options' set Y=Separated by, Y=Other as \n then click 'OK'. Now
   > save as CSV.

Thanks, that works nicely. I don't know how the heck the \n entered, but
at least I know how to deal with it. thanks

"jorge" == jorge <jrodriguez17@cpcecr.com> writes:

   > Hi Uwe and all:
   > I suggest:

   > a) Open the file as is: csv
   > b) Mark the column that content all the information
   > c) Use: Menu, Edit, Search and Replace ... click there
   > d) In the window opened: In the first row for input what to search,
   > input and "space" with spacebar
   > e) In the second row for input what to replace, keep without input
   > f) Apply the option Replace All
   > g) Now if all is good, you are eliminate the space after "name" field
   > h) Save the file again as csv
   > i) Now you can close the file and open again or use the option: Menu,
   > Data, Text to Column to split the fields in the column

Thanks, I did it with replace regexp using \n which also worked nicely.
I will keep in mind you suggestion for other cases, thanks