BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi! I've a problem.
I need to import unified excel files to sas using standart import procedure (range of rows, columns' formats etc.)
But if save the code I can operate with native file, not others.
If I edit code pointing another file, how can I point exact spreadsheet?

INFILE "D:\path\test.xls"
DELIMITER='*'
MISSOVER
DSD
I
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
With the IMPORT procedure: http://support.sas.com/kb/5/458.html
[pre]
proc import datafile="c:\myfiles\Accounts.xls"
out=sasuser.accounts;
sheet="Prices";
getnames=no;
run;

proc print data=sasuser.accounts(obs=10);
run;

[/pre]

But, your code snippet shows the MISSOVER option -- which is not relevant to PROC IMPORT. If you are using ODBC or DDE, the syntax is shown below:

Libname Engine: http://support.sas.com/kb/12/628.html
[pre]
libname mylib odbc dsn=Excel;

proc print data=mylib.'This Sheet$'n; run;

data mylib.new;
set mylib.'This Sheet$'n;
run;
[/pre]


DDE: http://support.sas.com/kb/2/929.html
[pre]
filename fileref dde 'Excel|[Book1]Sheet1!R1C1:R1C5';
infile filref missover dsd notab dlm='09'x;
input a b c d e;
run;
quit;
[/pre]

If you are still having problems with your program, your best bet for help is to contact Tech Support.

cynthia

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 613 views
  • 0 likes
  • 2 in conversation