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

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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