BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Fluorite | Level 6

I'm trying to read a xlsx file using the libname statement.

here is the sample code:


libname test1 PCFILES type=excel server = 'servername' port = 8261 path = "c:/test/dfsaa.xlsx";

I did run the proc setinit; It showed sas/access to pc files.

BUt I'm still encountering the error message. plz help me on this


Accepted Solutions
Fluorite | Level 6

Issue resolved. I forget to mention the  "path = " in the code

View solution in original post

Super User

What is your EORROR log ?

Sure. You can use this error message to search at   and find an answer.




  Usually, you only need SERVERNAME and PORT options if, for example, you are on a UNIX system and are trying to access an Excel file on a Windows system. As Ksharp suggests, if you put the text of your error message into the search box on, you will most likely find a SAS Tech Support note that explains about the error message. For example, if you only have SAS 9.1.3 on your system, you will not be able to read .XLSX files with the LIBNAME engine, you would find out about this and other possible errors such as the ones listed here: (not an exhaustive list -- I just pasted a few links):

So your error message could be related to that. Or, since you didn't post the error message, the best thing to do is to go to and on the right side of the page, look for the SEARCH box (it will be orange). Cut and paste your error message into the search box. Alternately, open a track with Tech Support, by clicking on the link "Submit a Problem" on the left side of the main page.


Fluorite | Level 6

I'm using sas 9.2 on windows server(64 bit) with sas/access to pcfiles

Here are the error messages I'm encountering:

libname test excel  "test1.xlsx";

Error: The Excel Engine cannot be found

Error:  Error in the libname statement;

so I tried doing this.

libname test pcfiles "test1.xlsx";

Error: Incorrect syntax for the libname statement. This engine doesnt accept a physical name.

Error: Error in the libname statement

Fluorite | Level 6

Issue resolved. I forget to mention the  "path = " in the code

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 3 in conversation