BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Analyticguru_09
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

1 ACCEPTED SOLUTION

Accepted Solutions
Analyticguru_09
Fluorite | Level 6

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

View solution in original post

4 REPLIES 4
Ksharp
Super User

What is your EORROR log ?

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

Ksharp

Cynthia_sas
SAS Super FREQ

Hi:

  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 support.sas.com, 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):

http://support.sas.com/kb/32/455.html

http://support.sas.com/kb/12/365.html

http://support.sas.com/kb/42/981.html

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 support.sas.com 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 support.sas.com main page.

cynthia

Analyticguru_09
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

Analyticguru_09
Fluorite | Level 6

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

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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