Import an excel file with a sheets

Reply
Super Contributor
Posts: 371

Import an excel file with a sheets

I want to import many sheets in excel file as sas datas

And I want the data name=sheet name

Respected Advisor
Posts: 3,065

Re: Import an excel file with a sheets

My favoured approach is to use the EXCEL LIBNAME (you need SAS/ACCESS to PC Files for this):

libname inxls excel "MyWorkbook.xls";

proc datasets library = out;

  copy in = inxls out = out;

run;

quit;

Super Contributor
Posts: 371

Re: Import an excel file with a sheets

When I use

proc setinit; run;

I see : SAS/ACCESS to PC Files

But it does not work, why ?

when I write

libname inxls excel "MyWorkbook.xls";

I have an error

Respected Advisor
Posts: 3,065

Re: Import an excel file with a sheets

When asking why an error has occurred please also supply your error message otherwise I would be guessing what the problem is.

Super Contributor
Posts: 371

Re: Import an excel file with a sheets

I will send you the error message later

But , if  i remember well, it will write

ERROR .....EXCEL.....

Question: we do not need a  window server with SAS/ACCESS to PC Files ?

Ask a Question
Discussion stats
  • 4 replies
  • 188 views
  • 0 likes
  • 2 in conversation