Desktop productivity for business analysts and programmers

Importing an excelfile from external source to server

Not applicable
Posts: 1

Importing an excelfile from external source to server

We are currently running SAS 9.1 on a UNIX server using EG 4.1. I want to access a file not on the server, the excel file is located on a shared drive which server SAS can not seem to access directly. We do not have PC SAS, otherwise I'd have this thing nailed; however, SAS EG can access these types of files through the point and click GUI interface. I pulled the code used behind the procedure but the portion where the raw data file is accessed and converted is not made visible. You just get the following comment in the code itself:

/ Enterprise Guide creates this temporary asterisk delimited text file from the original data source /

I thank anyone for taking the time to look at this, I am stumped at this point...
Community Manager
Posts: 3,464

Re: Importing an excelfile from external source to server


If the goal is to have a SAS program that can import the Excel file directly, you will need SAS/ACCESS to PC Files (there is a version for Unix that uses a mechanism called the PC File Server) and run PROC IMPORT.

EG uses the data access features built into Windows to read the Excel file and copy its contents to the SAS session. There is no SAS code that captures that work.

In EG 4.2, you can elect to have the Import Data task include the Excel records in the generated program as DATALINES (inline records). That creates a complete SAS program to create a data set, but it does not go back to the original Excel file when you re-run the program. Without SAS/ACCESS to PC Files, it's EG that does the work of extracting the contents from Excel.

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation