08-28-2016 04:52 PM - edited 08-28-2016 04:52 PM
I'm having trouble importing an excel file. I can import the full excel file perfectly fine, but when I want to import just a specific range within it, I'm running into errors and it won't import. Here's my code:
PROC IMPORT OUT=WORK.name DATAFILE="/folders/myfolders/foldername/filename.xlsx" DBMS=XLSX REPLACE; RANGE="C6:S251"; RUN;
I'm using SAS University Edition.
08-28-2016 05:18 PM - edited 08-28-2016 05:19 PM
Do you have any recommendations then? I need to get a specific range.
EDIT: I tried adding the sheet suggestion. It just imported the whole thing again.
08-28-2016 05:25 PM
Two other possibilities
or create a named range in excel and then use libname method.
If if no one posts a concrete solution I'll give it a look later tonight in detail.
08-28-2016 09:54 PM
I can import it , no problem. PROC IMPORT OUT=WORK.name DATAFILE="/folders/myfolders/have.xlsx" DBMS=XLSX REPLACE; RANGE="Sheet1$C6:E20"; RUN;