BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
vraj1
Quartz | Level 8

I have a variable and the text of it looks fine if i look

Randomisation:Parallel or cross-over?

 

But if i copy that variable and paste it wraps to next line and not sure the reason and it only happens to 1 value of the variable

Randomisation:
Parallel or cross-over?

 

Tried reducing length but no use. any clue why it happens

1 ACCEPTED SOLUTION

Accepted Solutions
gamotte
Rhodochrosite | Level 12

Do you mean that "Alt-enter" was used in excel to introduce a line break in the cell value ?

If so, it is normal that the pasted text contains a line break.

 

Your question does not seem to concern SAS language or software.

View solution in original post

5 REPLIES 5
gamotte
Rhodochrosite | Level 12

Hello,

 

Where do you copy your text from and where do you paste it ?

vraj1
Quartz | Level 8

It is imported from excel and it was done "Alt tab" to make it to next line and this is causing problem

data WORK.TEST;
  infile datalines dsd truncover;
  input _NAME_:$8. _LABEL_:$40. COL1:$1024. COL2:$1024.;
datalines4;
F1,F1,Trial,ID
F2,F2,,Trial name
F3,F3,,Sources
F4,F4,,Primary publication
F5,F5,,Trial number
F6,F6,Trial design,Objective
F7,F7,,Randomisation:
Parallel or cross-over?
F8,F8,,Setting
gamotte
Rhodochrosite | Level 12

Do you mean that "Alt-enter" was used in excel to introduce a line break in the cell value ?

If so, it is normal that the pasted text contains a line break.

 

Your question does not seem to concern SAS language or software.

vraj1
Quartz | Level 8

My concern is i was trying it to make it strip but cannot do it, used compress and strip.

What needs to be done to strip it?

gamotte
Rhodochrosite | Level 12
Use compress with the hex code for linefeed.

coll=compress(coll,'0A'x);

Catch up on SAS Innovate 2026

Dive into keynotes, announcements and breakthroughs on demand.

Explore Now →
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 3006 views
  • 1 like
  • 2 in conversation