BookmarkSubscribeRSS Feed
RAmarapuram
Obsidian | Level 7

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

5 REPLIES 5
ChrisHemedinger
Community Manager

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

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
bharath86
Obsidian | Level 7

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.

jebjur
SAS Employee

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. 

bharath86
Obsidian | Level 7
Thank you @jebjur for answering this.

Now can you please advise how do we get this SAS/ACCESS. Is it a seperate licence or how do we get this installed.
Do we need to raise a request through our company representative and how much does this cost us.

It would be great if you can share these details.

Thank you
Bharath
jebjur
SAS Employee

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 8275 views
  • 1 like
  • 4 in conversation