Database Reference
In-Depth Information
1
2
3 PROC IMPORT
4 DATAFILE='c:\My_Files\Shoes.xlsx'
5 DBMS=XLSX
6 OUT=shoes
7 REPLACE;
8 GETNAMES=NO;
9 RANGE='shoes$C2:F4'n;
10 RUN;
NOTE: The import data set has 3 observations and 4 variables.
NOTE: WORK.SHOES data set was successfully created.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.03 seconds
cpu time 0.01 seconds
Figure 3.6: SAS Output When Using PROC IMPORT to Select a Group of Cells from an Excel
Spreadsheet.
3.7 Conclusion
I have shown several methods of reading data and variable names from Excel workbooks. But, there are far too
many other combinations of options available for me to present an exhaustive list. This chapter showed features
of PROC IMPORT. Some of the important items to take away from this chapter are that the Microsoft Excel
JET and ACE engines have limitations. These limitations will occasionally affect the amount of data you can
extract from your Excel files. There may be times when you are required to fall back to the tried-and-true
delimited file formats to transfer your data to and from Excel. I suggest that you refer to SAS/ACCESS Interface
to PC Files: Reference for the version of SAS that you have installed. These documents have SAS version-
specific descriptions of the syntax and features available for the SAS Import Wizard and PROC IMPORT.
 
Search WWH ::




Custom Search