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?
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.
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.
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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.