Database Reference
In-Depth Information
The SAS documentation for your version will point out that the SAS date format and date informat must be
equivalent. This restricts the number and type of changes you can make on input from an Excel file. But,
you now have control over what changes are made. The following code is similar to Example 4.7, but it
changes the dates to different formats using the dataset option DBSASTYPE=.
LIBNAME xls_data EXCEL 'C:\My_excel_files\sales_data.xls';
DATA Sales_data3;
SET xls_data.'Sales_data$'n
(DBSASTYPE=(Date_Shipped='CHAR22.' Date_Delivered=NUMERIC));
Run;
Figure 4.9.6: SAS View Table of the Sales_data1 File Read from Excel.
The Date_Delivered field in Figure 4.9.6 shows numeric values similar to SAS DATE-time values except
the values are much larger than a SAS DATE numeric value. As mentioned above, the Excel base date is
30 DEC 1899,which is long before 01 JAN 1960.
Example 4.9 Processing on 64-Bit Operating Systems
This example demonstrates the syntax for accessing Excel files when running SAS on a Windows 64-bit
operating system. Similar syntax is required for using UNIX or LINUX operating systems. SAS/ACCESS
Interface to PC Files contains a program described as the SAS PC Files Server (pcfservice.exe). This
program runs as a service and can be configured to start automatically when your computer starts running.
This service program runs on a Windows operating system. It can be either a PC or a server, but it must run
on a Windows computer. Therefore, when UNIX and LINUX access Excel files, SAS must first log on to
the Windows system before they can access an Excel workbook. The PC Files Server must be running on a
Microsoft Windows platform that SAS can communicate with (i.e., send execution commands) for SAS to
process Excel data. The SAS PC Files Server program was written to communicate across the 32-bit / 64-
bit boundary. It was written before Excel 2010 became available as both a 32-bit and 64-bit application.
 
Search WWH ::




Custom Search