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

Have: a xlsb file.

Want: import part of the data to SAS EG.

 

Code used:

%macro Import;
			proc import datafile = "&_folderpath&_filepath&_filename" /* pre-defined, no error here */
						out =  work.test
						replace
						dbms= xlsb; /* changes were made here*/
						range='Sheet1$A3:Z900000'n;
						getnames=yes;
			run;
%mend Import;
%Import;
run;

One error reported:

ERROR: DBMS type XLSB not valid for import.

Tried to change the code to 

dbms= ExcelCS;

One error reported:

ERROR: Statement or Option "GETNAMES" not valid for EXCELCS IMPORT.

 

The column names come from A3:Z3. Definitely need it.

How to fix the codes?

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

What about DBMS = EXCEL or XLS? If you have the bitness problem then you can download the 64-bit ACE engine software from Microsoft as an alternative to using the SAS PC File Server. 

View solution in original post

2 REPLIES 2
CliftonDenning
Obsidian | Level 7

Have you tried with dbms=excelcs? Getnames unfortunately isn't supported with that dbms from what I can see. 

 

You could specify the range to ensure you have the right variable columns with range='a5:e21'n for example. Alternatively if you can have the range named it works even better. 

SASKiwi
PROC Star

What about DBMS = EXCEL or XLS? If you have the bitness problem then you can download the 64-bit ACE engine software from Microsoft as an alternative to using the SAS PC File Server. 

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
  • 2 replies
  • 11559 views
  • 0 likes
  • 3 in conversation