Database Reference
In-Depth Information
available for use to read or write the SAS and Excel files. Not all versions of SAS will write to Excel files
formatted for use by Excel 2007, Excel 2010, Excel 2013, or later versions of Excel.
1.4.1 SAS Explorer Window and Toolbar Processing Method Descriptions
The data transfer methods described in the remainder of this chapter start from the SAS Explorer window.
These methods can be used to prepare data to be viewed with the Excel application. A right-click on the
SAS file icon in the SAS Explorer window displays a menu from which one of the following options can be
selected. The first option starts the SAS Export wizard, and the other three options create HTML code that
can be opened by Excel or other applications.
●
Select the “E
x
port” option to run the SAS Export wizard.
●
Select the “Copy Contents to Clip
b
oard” option to copy HTML text and paste to an Excel file.
●
Select the “Save as
H
tml” option to copy data an HTML file that Excel can read.
•
Select the “Vie
w
in Excel” option to copy data to Excel files via HTML.
From the SAS toolbar there are two “File” options that provide access to Excel files. These are the
IMPORT and EXPORT options. As their names imply, the first option reads data from Excel into a SAS
dataset, while the second option writes data to an Excel workbook. These two options work with Excel
formatted files.
●
Menu option “Export Data” runs the Export wizard to copy data to an Excel file.
•
Menu option “Import Data” runs the Import wizard to copy data from an Excel file.
I had been using SAS for nearly 25 years before someone showed me that I could right-click on a SAS
dataset icon in the SAS Explorer window and have a menu pop up with output options for SAS files. Figure
1.4.1b below is that menu. The process is to open the SAS Explorer window, and then right-click on a SAS
dataset. A menu will appear with options that can be selected. The next four examples discuss the options
that can either read or write data for an Excel workbook.
Figure 1.4.1b: SAS Explorer Window “Right-Click” Options.
Search WWH ::
Custom Search