I am importing a dataset from excel using the built in import data wizard. However, when viewing the data in SAS, cells with newlines have all line feeds (alt+Enter) replaced with a period (.)
For example, in excel:
"Example text
with new line"
will be read in by SAS as:
"Example text.with new line"
Usually line feeds or carriage returns are replaced by spaces, where the hex code (if you format the text as hex) is 0A. When I convert the text in excel to hex in excel using a formula, the new line feeds also show up as 0A.
However, the hex code for the period in my text (what used to be a line return in excel) is 2E, rather than the expected 0A. This prevents me from differentiating them from normal full stops, which means there's no possible workaround. Has anyone else come across this issue? Is there an option to change/set the default line feed replacement character in SAS?
My import code (variables replaced with 'text' for simplicity) for reference:
data work.table;
length
text $ 50;
label
text = "Text"
format
text $CHAR50;
informat
text $CHAR50;
infile 'path/to/file'
lrecl=1000
encoding='LATIN9'
termstr=CRLF
dlm='7F'x
missover
dsd;
input
text $CHAR50;
run;