Hi All, I am new to SAS and am having trouble getting my data into SAS from Excel. I have tried it with both libname and proc import (code below) and both sort of work (e.g., I get no errors), but neither brings in the entire data set, just the first 255 columns. I have re-ordered the columns in the Excel file, made sure all variables were formatted as numbers in the Excel file, and made sure that all missing values are indicated by a dot with no effect. The original data has 2970 rows and 412 columns. So far I get a SAS dataset with 2970 rows but only 255 columns. The Excel file has several sheets in it but the only one I need is the one called "Data". Also, I assembled the data in the Excel file myself and have used it in Stata, so I am confident that there are not weird formatting things in it (like non-numerical values mixed with numbers, or incompatible variable names). I am using SAS 9.4 for Windows (32 bit), SAS Enterprise Guide 7.1 (64-bit) and Excel 2016 if that helps. So, how can I get my entire dataset into SAS from Excel? I realize that it is possible to import data in other formats, but I do a lot of work in Excel and it would be really convenient to be able to import from Excel directly, and everything I have read says that it is possible to do so, and it seems like I am really close to getting it to work. What am I missing? Thank you! ~Riva The two bits of code that give me exactly the same result: 1) libname fsafrica excel 'C:\Users\...\FS Africa Dataset 1960-2014.xlsx' mixed=yes;
Options validVarName=any;
data fsdata;
set fsafrica."Data$"n;
run; 2) proc import datafile='C:\Users\...\FS Africa Dataset 1960-2014.xlsx'
DBMS=EXCEL replace out=fsafrica;
sheet="Data$"n;
getnames=yes;
data fsdata; set fsafrica;
run;
... View more