Question

Forcing excel writer to use new line

  • 30 April 2021
  • 7 replies
  • 11 views

Badge

Hi

Can you please advice on how can i force the excel writer to use new line for multiple records. For example making a list of IDs instead of having the whole text as one line. Below is an example where the red is what i want to avoid, having to do it manually in excel, the green what I want to achieve.

 

 

Untitled


7 replies

Userlevel 2
Badge +17

Hi @dionysios​ , if you need to split a text line by some pattern and create new lines for each resulting split element, combination of the StringSearcher and the ListExploder might help you.

 

I don't know if it's correct, but it seems that "A*N*-EWC-****" (* is a digit) is the basic pattern and sometimes suffix "-a" or "-b" is added.

Could you please elaborate the correct pattern that should be applied to split the text line?

Userlevel 5
Badge +29

Hi @dionysios​ , if you need to split a text line by some pattern and create new lines for each resulting split element, combination of the StringSearcher and the ListExploder might help you.

 

I don't know if it's correct, but it seems that "A*N*-EWC-****" (* is a digit) is the basic pattern and sometimes suffix "-a" or "-b" is added.

Could you please elaborate the correct pattern that should be applied to split the text line?

I'd follow this approach, using the regex functionality in the string searcher will allow you to split out the individual parts

(A\dN\d-EWC-\d{4}(-[a-zA-Z]\d?)?)

'A\dN\d-EWC'-  will find a string that begins with an 'A', followed by a digit (0-9) followed by a 'N' , follwed by a digit and ending with '-EWC-'

'\d{4}' will find four digits in a row

'(-[a-zA-Z]\d?)?' is an optional statement (denoted by the '?' meaning zero or one). It will match a string that begins with a '-' followed by any letter (case insensitive) follow by an optional digit

 

 

Badge

@hkingsbury​  @Takashi Iijima​  hi guys, thanks for the reply. The problem is not really finding the pattern which its really always same format, easy to use a regex. I just cant make it write on excel as a list, one below the other. This however gives me some ideas, probably find the values with attribute manager before writting them on the excel. Thank you both

 

Userlevel 1
Badge +10

@hkingsbury​  @Takashi Iijima​  hi guys, thanks for the reply. The problem is not really finding the pattern which its really always same format, easy to use a regex. I just cant make it write on excel as a list, one below the other. This however gives me some ideas, probably find the values with attribute manager before writting them on the excel. Thank you both

 

Do the linefeeds already exist in your string?

Have you set the wrap text option on the attribute in the formatting options?

Capture

Badge

Do the linefeeds already exist in your string?

Have you set the wrap text option on the attribute in the formatting options?

Capture

hi @ebygomm​ yes i did try that one too. It did not work, i guess because i am using the attribute manager with @values from different attributes. i am going to play a bit more with different options.

Userlevel 1
Badge +10

Do the linefeeds already exist in your string?

Have you set the wrap text option on the attribute in the formatting options?

Capture

So your AttributeManager looks something like this?

CaptureIf the linefeeds are present and the column is set to wrap text it should just work.

Badge

Do the linefeeds already exist in your string?

Have you set the wrap text option on the attribute in the formatting options?

Capture

That is exactly how it looks but it didnt work.

Reply