BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
elena_pasquali
Calcite | Level 5

Hi, I'm trying to import xlsx file into SAS 9.4 M7 (32-bit) without success. 

This is my SAS code:

 

/* Import data */
PROC IMPORT OUT=WORK.RFI_CONTACT
DATAFILE="Y:\Biostat\RFI\RFI_draft_20220126.xlsx"
DBMS=XLSX REPLACE;
RANGE="CONTACT DETAILS";
GETNAMES=YES;
MIXED=NO;
SCANTEXT=YES;
USEDATE=YES;
run;

 

and this is the error:

ERROR: DBMS type XSLX not valid for import.

 

I think that the problem is because my Office environment could be 64-bit but I don't know how to solve the problem.

I don't want to use the wizard.

Can you help me?

 

I have downloaded SAS 32-bit version because it was suggested by the system during the installation process.

 

Many thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

The nice thing about the XLSX engine is that it does not rely on external modules, and is therefore not depending on bitness. After all, XLSX is just a ZIP archive of XML files.

Most likely you do not have SAS/ACCESS to PC Files licensed or installed.

Please run PROC SETINIT and PROC PRODUCTSTATUS, and post the log from that.

View solution in original post

5 REPLIES 5
AMSAS
SAS Super FREQ

Do you have a typo somewhere, the code and the error message don't appear to match 
The code has xLSx but the error xSLx

Can you import a different Excel file?

Use the wizard and see if returns an error

 

Kurt_Bremser
Super User

The nice thing about the XLSX engine is that it does not rely on external modules, and is therefore not depending on bitness. After all, XLSX is just a ZIP archive of XML files.

Most likely you do not have SAS/ACCESS to PC Files licensed or installed.

Please run PROC SETINIT and PROC PRODUCTSTATUS, and post the log from that.

elena_pasquali
Calcite | Level 5

Thank you for your answer!

The problem was related to the SAS/ACCESS to PC Files, it was present in the trial version but not in the official one!

 

Ksharp
Super User
Save it as low version Excel file like Excel 2003 .and using DBMS=XLS or DBMS=EXCEL
Tom
Super User Tom
Super User

I make that typo all of the time.

1563  filename xxx temp;
1564  proc export data=sashelp.class dbms=xlsx file=xxx replace;
1564!                                                            run;

NOTE: The export data set has 19 observations and 5 variables.
NOTE: "XXX" file was successfully created.
NOTE: PROCEDURE EXPORT used (Total process time):
      real time           0.03 seconds
      cpu time            0.01 seconds


1565  proc import datafile=xxx dbms=xslx out=class replace;
ERROR: DBMS type XSLX not valid for import.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds

1565!                                                       run;
1566  proc import datafile=xxx dbms=xlsx out=class replace;
1566!                                                       run;

NOTE: One or more variables were converted because the data type is not supported by the V9 engine. For more details, run with
      options MSGLEVEL=I.
NOTE: The import data set has 19 observations and 5 variables.
NOTE: WORK.CLASS data set was successfully created.
NOTE: PROCEDURE IMPORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds

The other one to try is to get it wrong on the filename extension and then you have to try to figure out why Excel won't open it.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 711 views
  • 1 like
  • 5 in conversation