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-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!

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
  • 786 views
  • 0 likes
  • 5 in conversation