Hi Team
We have recently migrated from SAS EG 4.1 to SAS EG 7.1.
Have an issue with PROC IMPORT, the below code is able to import data onto xls sheet.
We are using 32-bit MSOFFICE 2010.
PROC IMPORT OUT= WORK.PathParameter
DATAFILE= "C:\TEST\XXX03.xls"
DBMS=xls REPLACE;
GETNAMES=YES;
MIXED=YES;
USEDATE=YES;
SCANTIME=YES;
SHEET="Path Parameter";
RUN;
However, the code generates below error :
26 GETNAMES=YES;
27 MIXED=YES;
28 USEDATE=YES;
_______
180
29 SCANTIME=YES;
________
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
30 SHEET="Path Parameter";
31 RUN;
I tried browsing for different for a resolution on blogs/communities.But could not get a resolution for this.
Could you please help me on this ?
Thanks
Rajesh
I'm not sure that SCANTIME is supported with DBMS=XLS. It might be strictly for DMBS=EXCEL or EXCELCS. If using 64-bit SAS with 32-bit Office, try DBMS=EXCELCS -- this will use the SAS PC Files Server component, which should autostart on your Windows 64-bit SAS. If your SAS is not on Windows (for example, on Linux now), then more setup is required.
If you can get your data into XLSX format, then DBMS=XLSX might also work without additional setup.
Chris
Hello Chris,
I am running through an error while trying to run the below code. I am using SAS EG 8.2, 64-bit.
My question is do we need SAS Access to import files from a PC using proc import procedure.
If I use an import data procedure in EG the way it reads excel is different from proc import, because our excels have data starting at different rows and it varies from excel to excel.
PROC IMPORT OUT= WORK.temp
DATAFILE= "id.xlsx"
DBMS=XLSX REPLACE;
/* SHEET='PD';*/
GETNAMES=YES;
DATAROW=7;
RUN;
ERROR: DBMS type XLSX not valid for import.
Yes, you need to have SAS/Access to PC Files licensed and installed on the SAS server in order to use PROC IMPORT code to import Excel files.
If you would like to have SAS/Access for PC Files licensed for your site, then your SAS site representative is the best person to have contact the Customer Information Center for any questions you may have about purchasing the product, including pricing information. The number is (800)727-0025. Once you have that product licensed, feel free to open a track with Technical Support if you need assistance with the installation.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.