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
Diamond | Level 26
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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 1036 views
  • 0 likes
  • 2 in conversation