Usage Note 13050: Syntax for referencing cells using LIBNAME Excel engine
Using SAS 9.0 or higher, SAS/ACCESS for PC Files users can assign a
libref to an Excel workbook file as follows:
libname db "c:\public\dbms\excel\V2000\sasdemo2000.xls" ;
To reference a subset of an Excel worksheet, using the LIBNAME Excel
statement, users can:
1 - In Excel, create a Named Range for the subset of the worksheet and
then specify that Named Range Name in the SAS code. This is the
preferred method. The Range Name is not case sensitive, but no
special characters are allowed:
PROC PRINT DATA=db.Customer_Information; RUN;
2 - Specify the worksheet name (Customer Information) with an
absolute range, e.g. cells from A2 to F22. The worksheet name is
case-sensitive:
PROC PRINT DATA=db.'Customer Information$A2:F22'n; RUN;
Operating System and Release Information
SAS System | SAS/ACCESS Interface to PC Files | Microsoft Windows NT Workstation | 9 TS M0 | |
Microsoft Windows XP Professional | 9 TS M0 | |
Microsoft Windows 2000 Server | 9 TS M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9 TS M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9 TS M0 | |
Microsoft Windows Server 2003 Standard Edition | 9 TS M0 | |
Microsoft Windows 2000 Advanced Server | 9 TS M0 | |
Microsoft Windows 2000 Datacenter Server | 9 TS M0 | |
Microsoft Windows 2000 Professional | 9 TS M0 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Usage Note |
Priority: | low |
Date Modified: | 2004-08-19 12:31:57 |
Date Created: | 2004-08-12 10:18:05 |