Skip to main content

I have oracle table that needs to be exported to excel

the table has 1 column that has multiple line

Excel Writer is good enough to make it into 1 line automatically.

 

But the 2 words that separated by New Line or Carriage Return became 1 word instead split it with single space.

For Example an address Column:

"Hello

 

World"

Excel Write put it in 1 cell "HelloWorld"

no space between

"Hello" and World"

How to tell Excel Writer not to do that ?

Expected Result "Hello World" with space in the middle

 

In the folumn formatting dialog, make sure you set the Text Control to "Wrap text":


In the folumn formatting dialog, make sure you set the Text Control to "Wrap text":

Hi @david_r

 

 

I tried, it still the same.

 

 

 


Weird, works for me.

What happens if you open the output in Excel, select the column and hit the Wrap Text format button?

My impression is that the newlines are indeed written by FME, and that it's a formatting issue in Excel.


Hi @sebastianolaf, if it's allowed to replace carriage return and/or new line with a single space, it would also be a workaround to use the StringReplacer with this setting. The regex '\\s+' matches one or more consecutive white-space characters including carriage return and new line.

  • Mode : Replace Regular Expression
  • Text to Replace: \\s+
  • Replace Text: <enter a space>

Weird, works for me.

What happens if you open the output in Excel, select the column and hit the Wrap Text format button?

My impression is that the newlines are indeed written by FME, and that it's a formatting issue in Excel.

Hm, I tried ran several times

 

It works after couple of try, I don't stand it either,

 

the 1st screenshot didn't refresh the excel, 2nd then ok

 

I didn't change the edit settings

 

 

Thank you

 

 


Hi @sebastianolaf, if it's allowed to replace carriage return and/or new line with a single space, it would also be a workaround to use the StringReplacer with this setting. The regex '\\s+' matches one or more consecutive white-space characters including carriage return and new line.

  • Mode : Replace Regular Expression
  • Text to Replace: \\s+
  • Replace Text: <enter a space>
I also tried this way,

 

it works but i use '(\\n+)'

 

 

Thank you

 

 


Reply