Desktop productivity for business analysts and programmers

Code for Importing Excel Files

Reply
N/A
Posts: 0

Code for Importing Excel Files

I typically work in a coding environment in SAS 9.2, but I have a student using SAS Enterprise Guide. Normally I use the following code to read in an excel file in 9.2 :

PROC IMPORT OUT= WORK.SET1
DATAFILE= "C:\Documents and Settings\wkuuser\Desktop\TEST_EXCEL1.xls"
DBMS=EXCEL REPLACE;
SHEET="Sheet4";
GETNAMES=YES;
MIXED=NO;
SCANTEXT=YES;
USEDATE=YES;
SCANTIME=YES;
RUN;

This won't work in the coding environment for Enterprise Guide. Can someone suggest adjustments I can make to get the code to work?

Thanks.
Valued Guide
Posts: 2,111

Re: Code for Importing Excel Files

EGuide has a point-n-click interface to getting the excel file in. click

file --> open --> data --> local computer
navigate to the excel file and select it, then select the sheet, and decide whether to view the sheet or to convert to a SAS dataset.

Doc Muhlbaier
Duke
N/A
Posts: 0

Re: Code for Importing Excel Files

You might find a code adaptation at http://support.sas.com/kb/6/976.html
N/A
Posts: 0

Re: Code for Importing Excel Files

Thanks. I'll see if I can use this to tweak my code.
Ask a Question
Discussion stats
  • 3 replies
  • 121 views
  • 0 likes
  • 2 in conversation