Import of excel(.xls) file..

Accepted Solution Solved
Reply
Contributor
Posts: 64
Accepted Solution

Import of excel(.xls) file..

Hi every one ,

I have a xls file, but I have to do it without proc import procedure and DDE triplet.

I have to use only "infile and data step"

please help.... .


Accepted Solutions
Solution
‎09-27-2013 10:59 AM
Super User
Posts: 10,466

Re: Import of excel(.xls) file..

Options will depend on version of SAS and modules.

One option is to save the xls as CSV and read the text file.

If you can't use proc import because you don't have the Access to PC Files module you could use import on the resultant CSV file. Especially as the log will show the data step used to read the set. The code can be copied or recalled and edited to allow more control.

View solution in original post


All Replies
Super Contributor
Posts: 543

Re: Import of excel(.xls) file..

How about this?

LIBNAME foo excel "your_path\your_excel.xlsx' ;   

data step;

    set foo.'Sheet1$'n;

run;

Would this work?

Anca.

Contributor
Posts: 64

Re: Import of excel(.xls) file..

Hi Anca..

I will let you know it .. i don't have SAS @ my home..

thank you.

Contributor
Posts: 64

Re: Import of excel(.xls) file..

Hi,

Thank you for you both.. the suggestion helped to gain knowledge. but, as of software issue i couldn't make Anca's procedure.

Thank you Again.

--

Durga.

Solution
‎09-27-2013 10:59 AM
Super User
Posts: 10,466

Re: Import of excel(.xls) file..

Options will depend on version of SAS and modules.

One option is to save the xls as CSV and read the text file.

If you can't use proc import because you don't have the Access to PC Files module you could use import on the resultant CSV file. Especially as the log will show the data step used to read the set. The code can be copied or recalled and edited to allow more control.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 425 views
  • 0 likes
  • 3 in conversation