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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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