BookmarkSubscribeRSS Feed
Ivan555
Quartz | Level 8

Hello!

 

In accordance with the exsample as a result I do have two tables.

The goal is to save them as *.xlsx files on path "C:\" by writing code. (without any manual use of build-in servises like Export button).

Is it possible in SAS?

 

Thx for consideration.

 

 

proc sql;
create table t1 (id int, typ int, dt char(8), qty int);
insert into t1 
values (1, 2, '20190325', 50)
 values (2, 2, '20190320', 15)
  values (3, 3, '20190401', 50);
  
create table t2 as (id int, typ int, dt char(8));
values (4, 3, '20190405') values (5, 1, '20190406');
quit
;

 

5 REPLIES 5
Ivan555
Quartz | Level 8

have found LIBNAME function, i am writing like

 

LIBNAME xdb EXCEL 'C:\!lib\1.xlsx'; 

 

and i am getting errors

 

ERROR: The EXCEL engine cannob be found.

ERROR: Error in the LIBNAME statement.

 

I have to install the Excel engine.. or what?

andreas_lds
Jade | Level 19

Which SAS-version are you using?

Ivan555
Quartz | Level 8

SAS Version 7.12 HF4 (7.100.2.3458)

 

I also do have active SAS/ACCESS Interface to PC Files (it is on)

 

andreas_lds
Jade | Level 19

@Ivan555 wrote:

SAS Version 7.12 HF4 (7.100.2.3458)

 

I also do have active SAS/ACCESS Interface to PC Files (it is on)

 


This looks like a version number of SAS Enterprise Guide, but i asked for the version of your sas-installation.

When you execute

%put &=SYSVLONG;

The version-number is printed to the log.

Ivan555
Quartz | Level 8

sorry, 9.04, that is?

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1168 views
  • 0 likes
  • 2 in conversation