@rmacarthur wrote:
Because there are so many, individually saving them as a .xlsx file for import seems impractical, which is how many SAS programmers handle this.
I'm not sure where you got this idea, but I'd say that goes against best and recommended practices for importing data. Any decent SAS programmer would say that importing data from a CSV is infinitely easier than XLSX, especially if you have multiple files and need to ensure your variables are all the same type. I almost guarantee that if you converted these all to Excel and then tried to read it, you'd get a mismatch of types between some files.
The only time I recommend using Excel as an intermediary is when you have comments, or long text fields that could have all sorts of punctuation in it to mess up the data - for example free text answers on surveys. And I definitely know quite a few programmers who disagree with me on that one 🙂
Well, the approach comes from working with very uniform spreadsheets and complete consistent datasets with no missing variables, where an excel import procedure works well. We live in a rarefied work setting where that is the case. I totally agree, however, that when importing messier data a data step is far superior.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.