04-17-2012 06:31 PM
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
04-18-2012 09:54 AM
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):
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.
04-18-2012 11:37 AM
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
Need further help from the community? Please ask a new question.