options validvarname = v7;
options symbolgen;
options fullstimer;
I remember by this system statements, we have
Patient ID # A column name in xlsx table.
became this
Patient_ID
in SAS after importing previously.
But now it is not working!
Did you execute the statement in the current session?
options validvarname = v7;
I suspect the Learners version resets many of the system options to defaults at start of the session.
Or show the log of what you have done to see if there is something else going on.
Such as possibly not replacing an existing data set on import.
Personally I have hated XLSX, and the predecessor XLS, file formats so much that I way prefer saving the file to CSV (comma separated values) and writing a data step to read the data from the resulting text file as then I control what the variable names are, the types, lengths and can add labels and formats as needed as well as data checking.
Even importing the CSV file will generate a data step code to see what was done and can be copied from the log and modified to do what is desired and not stuck with the black box of import of XLSX with no real feedback.
Thanks for the response.
Yep, I ran the options statement first, before I ran the import script.
SAS OnDemand also encountered the same issue.
PS: The same codes was fine previously.
Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.
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.
Ready to level-up your skills? Choose your own adventure.