BookmarkSubscribeRSS Feed
PSARAVANAN
Calcite | Level 5

How to import an excel file without xlsx or excel engine? Is there any alternative for it?

6 REPLIES 6
Patrick
Opal | Level 21

Save it as a .csv and then import the .csv.

If you're working in a Windows environment and need to automate things then you could write a vb script and call the vb script for saving the excel as .csv (if the SAS option is set to XCMD and not NOXCMD)

PSARAVANAN
Calcite | Level 5

Hi Patrick,

 

Thanks for your response.

 

  1. Can you please explain the procedure if I have to do the same in UNIX environment?
  2. And also, is it possible to convert the file directly from excel to SAS dataset instead of going through the .csv conversion?
andreas_lds
Jade | Level 19
To the second question: no, afaik this is not possible. There could be a way involving java objects and and some fancy stuff from Apache, but I never did this, but I heard some people use this on Solaris to create and update Excel files.
ed_sas_member
Meteorite | Level 14

Hi @PSARAVANAN 

Have you tried to run a proc import:

proc import datafile="&path/your_file.xlsx"
			dbms=xlsx
			out=work.mydata
			replace;
	sheet=/*put sheet name*/;
run;
Kurt_Bremser
Super User

@ed_sas_member wrote:

Hi @PSARAVANAN 

Have you tried to run a proc import:

proc import datafile="&path/your_file.xlsx"
			dbms=xlsx
			out=work.mydata
			replace;
	sheet=/*put sheet name*/;
run;

I think that the OP's problem is that they do not have ACCESS to PC Files licensed, so that won't work.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 1101 views
  • 0 likes
  • 5 in conversation