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
Issue resolved. I forget to mention the "path = " in the code
What is your EORROR log ?
Sure. You can use this error message to search at support.sas.com and find an answer.
Ksharp
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
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
Issue resolved. I forget to mention the "path = " in the code
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.