DATA Step, Macro, Functions and more

How to read Excel to SAS without DDE or SAS /Access Interface to PC files

Reply
Contributor QLi
Contributor
Posts: 57

How to read Excel to SAS without DDE or SAS /Access Interface to PC files

I use Enterprise Guide 4.1. I want to read Exel to SAS. But I don't have DDE and SAS Access for Pc files.
So I cann't use PROC IMPORT or PROC ACCESS. Anyone know how to use INFILE statement to read?


Thanks in advance.

Qli
SAS Super FREQ
Posts: 8,744

Re: How to read Excel to SAS without DDE or SAS /Access Interface to PC files

Hi:
This blog has some useful information about EG and importing Excel files:
http://blogs.sas.com/sasdummy/index.php?/archives/258-Behind-the-scenes-importing-Excel-files-using-...

You also might find more help if you posted this question in the SAS Enterprise Guide forum:
http://support.sas.com/forums/forum.jspa?forumID=10

cynthia
Super User
Posts: 3,114

Re: How to read Excel to SAS without DDE or SAS /Access Interface to PC files

You can't read native Excel spreadsheets with INFILE. However if you save your Excel spreadsheets as a delimited file, for example CSV (comma delimited) you can then PROC IMPORT these files using DBMS = CSV or DLM, or an INFILE using the DLM option.
Contributor
Posts: 33

Re: How to read Excel to SAS without DDE or SAS /Access Interface to PC files

Have to agree with SASKiwi - save your Excel spreadsheet as a delimited file (we prefer tab delimited, but obviously it will depend on the contents of your data as to what delimiter you choose). This is one example of when knowing what's available as a component of SAS but not having that feature makes one covetous Smiley Happy
Contributor QLi
Contributor
Posts: 57

Re: How to read Excel to SAS without DDE or SAS /Access Interface to PC files

Thanks all,

I worked it out. Since DBMS type EXCEL not valid for import for Enterprise Guide, after changed to CSV file and worked well.
Ask a Question
Discussion stats
  • 4 replies
  • 370 views
  • 1 like
  • 4 in conversation