07-19-2016 09:11 AM
I am trying to import an xlsx file into SAS Studio 3.5 (university edition) using the following code:
libname orionx excel "\folders\myfolders\Projects\Filename.xlsx";
Where \folders\myfolders\Projects is a path in the SAS system.
On execution the log shows:
Does the 64 at the end indicate that it is 64-bit?
Is there is a way to access xlsx files using the EXCEL engine?
Or would I need to use the PCFILES or XLSX engines?
Also, once the bitness issue is resolved can I pick up a file directly from C:\...\Filename.xlsx instead by using this path instead of the \folders\myfolders\Filename.xlsx from within the SAS system?
07-19-2016 09:16 AM
And no you can't use the c:\ path.
SAS UE is on a UNIX box and a VM. Essentially it's like SAS is on a different computer, more similar to working with SAS on a server.
This is why the Excel engine doesn't work.
It's also why you need to set up the shared folder. You can add further shared folders if you'd like to more frequently used locations. See the SAS UE FAQ to learn how.
07-19-2016 09:31 AM
Thanks for the prompt reply @Reeza. Will give it a go using the XLSX engine. So you're saying the reason why the EXCEL engine doesn't work is because SAS Studio University Edition is on a Unix box and the issue isn't relating to the difference in bitness, is this correct?
Also, if we are accessing a file from a different location, would using the SERVER= option help?
07-19-2016 10:05 AM
Though the log displays that the code has successfully executed there is nothing in the newly created orionx library that the following line of code created:
libname orionx xlsx "C:\...\Filename.xlsx";
Shouldn't the library have the imported xlsx file or the SAS dataset that I was attempting to import?
07-19-2016 10:10 AM
Libname creates a connection to the Excel file, it doesn't import anything.
You still don't refer to it as C:/... Check the FAQ or right click the folder and get the path from properties.
07-19-2016 10:37 AM
Got it. Used the internal SAS folder "/folders/myfolders/..." that I uploaded the file to. I can now see the worksheets from the xlsx file in the newly created orionx library. Was able to view the data using a 'proc contents data=orionx.sheet1'. Sorry, I was a bit confused between proc import with what this was supposed to achieve.
Need further help from the community? Please ask a new question.