I'm trying to make new summary sheets, and modify a series of variables' name. First read files from Excel and change varible's name to the table's first line. Can anyone help me?
If you use proc import, by default the variables are named using the first record of the file.
Unfortunately I don't have the add-on which allows you to import directly from Excel ("SAS/Access for PC Files" I think), so I can't test this directly, but to read a CSV file you'd do this...
To read in an excel file, the DBMS= is changed to EXCEL (or something similar, their are several EXCELx options for different versions of Excel, more info is in the Help files).
For more info, type PROC IMPORT in your code window, highlight it and hit F1.
I hope that helps...
Chris
Business Analyst, Code Monkey, Data Wrangler.
SAS Guru.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.