Database Reference
In-Depth Information
1.3.1 Highlight, “Cut” or “Copy,” and Then “Paste”
When you are using Microsoft Windows, this method has only a few simple steps.
Hold down the left mouse button and highlight the area you want to cut or copy.
Release the left mouse button and leave the area highlighted.
When using a Microsoft Windows (and some other systems) right-click on the highlighted area.
Choose the menu option to either “cut” or “copy” the highlighted information.
Move the cursor to the desired location and right-click.
Choose the menu option to “paste”.
Microsoft Windows operating systems allow key stroke combinations to substitute for the menu choices:
key combination “CNTL” and “x” substitute for “cut”
key combination “CNTL” and “c” substitute for “copy”
key combination “CNTL” and “v” substitute for “paste”
NOTE: The mouse devices on some computers have their left and right mouse button functions inverted.
1.3.2 Convert Text Data to Excel Column Data Fields
Here, we will select a small part of the SASHELP.SHOES file as an example. I recommend this method for
moving a few lines of data at a time, and I use this technique frequently. In SAS 9.3 and beyond, the default
is to output HTML and display it in the Results window. I usually go to the SAS Tools►Options►
Preferences window and, on the Results tab, select both “Create Listing” and “Create HTML.” That way I
can go to the Output window and highlight the data printed by the PROC PRINT statement below. The
SAS WHERE statement limits the output observations from the region “Asia” for products “Boot”,
“Sandal”, and “Slipper”.
PROC PRINT DATA= sashelp.shoes
(WHERE=(region = "Asia" and
product IN ("Boot", "Sandal", "Slipper")));
RUN;
Figure 1.3.1: SAS Output Window Showing the Output from the PROC PRINT Statement
Above.
The data in the SAS Output window can then be copied from the SAS Output window and pasted into
column A of an Excel spreadsheet. See Figure 1.3.2 below. Microsoft Excel applications have a wizard to
convert text values to Excel columns. The output in the SAS Output window will be separated by spaces.
 
Search WWH ::




Custom Search