- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
I'm having trouble importing an external file in excel format to SAS DI Studio.
Inside SAS, I'm creating an external file > User input...
We don't have direct access to files in SAS.
In the metadata section I put the following code:
PROC IMPORT OUT=WORK.file;
DATAFILE="/mydata/Sample Data.xlsx"
DBMS=xls REPLACE;
SHEET="Sheet1$";
GETNAMES=YES;
MIXED=YES;
SCANTEXT=YES;
USEDATE=YES;
SCANTIME=YES;
RUN;
The file is created, but it does not load any data and with the File Reader transformation and I get the following error:
ERROR: FILE = OR TABLE= IS REQUIERED AND MUST BE SPECIFIED
Excel only has one sheet with different types of data. I don't know if I have to define the SAS code in the external file differently, but I have defined the columns well or you can't load external files in excel format this way.
Could someone tell me a possible solution, please?
Thank you very much.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You mean User Written external file, right?
What do you mean you don't have direct access to files?
Is your PROC IMPORT working outside DI Studio?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I don't have direct access to the folder where the files are uploaded. I don't know if that's a problem.
How can I compare that my PROC IMPORT works outside SAS DI?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Try the code in Enterprise Guide, SAS Studio or even in the DI Studio code editor.
Once working there, try to implement in the metadata.