How to import an excel file
Download
1 / 17

How to Import an Excel File - PowerPoint PPT Presentation


  • 61 Views
  • Uploaded on

How to Import an Excel File . Using the SAS Import Wizard SAS 9 for Windows. Go to the File menu and select “Import Data”. Choose the file type. Note: Click on the arrow at right of file format box to get a list of file types. Select the appropriate file type, then click “Next”.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'How to Import an Excel File' - kimn


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
How to import an excel file

How to Import an Excel File

Using the SAS Import Wizard

SAS 9 for Windows



Choose the file type
Choose the file type.

Note: Click on the arrow at right of file format box to get a list of

file types. Select the appropriate file type, then click “Next”.


In the connect to ms excel window browse to the file name
In the Connect to MS Excel window, Browse … to the file name.

Browse to the folder where you saved the Excel files.


Locate and select the filename in this example group1 xls
Locate and select the filename, in this example, “group1.xls”

Note: You will see a list of files to select. If you have selected the file type as Excel, you will only see files that have the filename extension “.xls” .After selecting group1.xls, click on “Open”.


Click on ok to select the file
Click on “OK” to select the file. “group1.xls”

Verify your file selection by clicking on “OK”.


Select the correct sheet from the list
Select the correct sheet from the list. “group1.xls”

The arrow at the right provides a pull-down list of available sheets.

Select the correct sheet, and then click on “Next>”.


Save the data set and click on finish or next
Save the data set and click on “Finish” or “Next”. “group1.xls”

The library selected may be WORK, or another library you have

previously defined. Type the SAS data set name in the “Member:” box.

Click on “Finish” to implement the import, or “Next” to save commands

for importing. Use “Next” for homework 1.


Create sas statements to import the data
Create SAS statements to import the data. “group1.xls”

If you selected “Next” you may now save SAS statements in a command file to use later. After specifying the file name, click “Finish”. For homework 1, you will save a command file called homework1.sas. Be sure you remember where you save the file, so you can pull it up later.


Check the sas log to be sure the data set was created
Check the SAS log to be sure the data set was created “group1.xls”

For homework 1, you should see a NOTE: that says “WORK.group1” was successfully created.


From the editor window open the saved sas statements
From the Editor Window, Open the saved SAS statements “group1.xls”

For homework 1, you would open homework1.sas from the Enhanced Program Editor window.


Browse to the name of your saved commands
Browse to the name of your saved commands “group1.xls”

For homework 1, you would open the command file, homework1.sas,

from the folder where you previously saved it.


Modify the commands so you can import group2 xls
Modify the commands, so you can import group2.xls. “group1.xls”

You will copy and paste the commands for each Excel file.


Submit your commands
Submit your commands.. “group1.xls”

In the Program Editor Window, highlight the commands to import the data for

all of the 8 groups. Submit by clicking on the running figure icon.



Type a data step to combine data for all groups
Type a data step to combine data for all groups. properly created.

Highlight and submit the data step commands.

Check the SAS log to make sure your commands worked properly.


Submit commands for the rest of the homework
Submit commands for the rest of the homework properly created..

  • Type the commands for each procedure, submit them, and check the results.

  • Re-save your command file.

  • The SAS commands in the Enhanced Program Editor window can be copied and pasted into a Word document for your homework.

  • Output from the SAS output window can also be copied and pasted into a Word document for your homework.

  • You cannot edit the SAS output in SAS, but you can in Word.


ad