04-08-2013 04:14 PM
I have been trying to import a excel spreadsheet into sas that contains both characters and numbers. I figured out that you can use a libname statement to read in the excel spreadsheet as a sas file. You can add the "mixed=yes" option to the libname statement to read in both characters and numbers. I used the following code:
libname xlsstd "U:\johnsok\STD_HIV 2011.xls" mixed=yes;
Now the dataset is in SAS but it is only READ ONLY. This is the error that I get in my log: ERROR: Write access to member XLSSTD.'all$'n.DATA is denied.
I'm not sure how to get around this and convert the dataset into a writable dataset so I can run some analyses. Any suggestions? Thanks in advance!
04-09-2013 01:43 PM
Ok it worked!
Now I am creating a table, by county, to have variables (health indicators) listed with their frequency, rate and rank using proc print. In the beginning, the characters (i.e. <4, this is how I need it to appear) remain with the number and character, <4, in the frequency column, but as soon as I run it in a macro or when I use proc print, the <4 disappears and it puts a "." as if the value is missing. Any suggestions as to how to keep the character and number together (<4).
Thanks in advance!
Need further help from the community? Please ask a new question.