Iam reading an excel file using OnDemand. I tried both my own code and the right clicking option. Some of the variables names have spaces/#/- characters in the names, which we would expect SAS to convert to underscore.
PROC IMPORT DATAFILE="/home/....../raw data.xlsx"
OUT=WORK.MYdata
DBMS=XLSX
REPLACE;
GETNAMES=YES;
RUN;
The log says everything went ok:
Group | Num | 8 | BEST. | Group |
Plate | Num | 8 | BEST. | Plate |
Cohort | Num | 8 | BEST. | Cohort |
Dam ID | Num | 8 | BEST. | Dam ID |
Infant ID | Num | 8 | BEST. | Infant ID |
Day | Num | 8 | BEST. | Day |
GM-CSF | Num | 8 | BEST. | GM-CSF |
IFN-g | Num | 8 | BEST. | IFN-g |
IL-1b | Num | 8 | BEST. | IL-1b |
IL-ra | Num | 8 | BEST. | IL-ra |
I did not get any of the usual messages about SAS converting IFN-g to IFN_g, etc...
Also running the exact same code in the licensed version produces this (which is what we would expect):
Group | Num | 8 | BEST. | Group |
Plate | Num | 8 | BEST. | Plate |
Cohort | Num | 8 | BEST. | Cohort |
Dam_ID | Num | 8 | BEST. | Dam ID |
Infant_ID | Num | 8 | BEST. | Infant ID |
Day | Num | 8 | BEST. | Day |
GM_CSF | Num | 8 | BEST. | GM-CSF |
IFN_g | Num | 8 | BEST. | IFN-g |
IL_1b | Num | 8 | BEST. | IL-1b |
IL_ra | Num | 8 | BEST. | IL-ra |
I an not sure what to try anymore. Why isn't SAS OnDemand giving me exactly the same result as the licensed version? (I ended up creating a SAS file in the licensed version and reading that file in the OnDemand, but I would like to be able to just import the xlsx file). Does anybody have any suggestions? I am attaching an abbreviated data set.Thank you!
You can also set this option by select the More Options Icon on top right & then selecting preferences, select Tables from the list & set SAS variable name policy to V7.
You can also set this option by select the More Options Icon on top right & then selecting preferences, select Tables from the list & set SAS variable name policy to V7.
Thank you so much for your help.
Worked perfectly.
ana-maria
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Ready to level-up your skills? Choose your own adventure.