BookmarkSubscribeRSS Feed
Felixmb
Fluorite | Level 6

Hi, this program is to export one file to microsoft office when we have a one table,

proc export
data=work.rr_if_datos_basicos_stl_201603
outtable='ACCESSCS'
dbms=ACCESSCS replace;
database='D:\Users\fmartinb\Desktop\prueba.mdb';
run;

 

but i if have more datas??

thanks

6 REPLIES 6
Reeza
Super User

1. Write multiple proc exports. 

2. Use the libname method instead

 

libname out accesscs 'path to mdb file';

 

data out.table1;

set table1;

 

data out.table2;

set table2;

run;

 

libname out;

ChrisHemedinger
Community Manager

I *think* that @Reeza's solution is elegant -- but the actual syntax would be LIBNAME PCFILES (not ACCESSCS).  And it requires the PC Files Server, but if you have 64-bit SAS on Windows and 32-bit Office, it's probably all set up.  ACCESSCS has the same requirement, so if you're using that, you're good.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
Reeza
Super User

Thanks @ChrisHemedinger

 

The libname syntax would be

 

libname out PCFiles path='path to file';

robertyknwt
Obsidian | Level 7

I've got a similar situation here, and I'm not sure what I need. I have SAS EG 6.1 64-bit and 7.1 64-bit, but I don't have SAS itself on my PC (we're running on a GRID server). I need to export to Access (I have Office Professional 2010, 32-bit), but I don't see that option within EG. Can I do it if I install the PC Files Server (and is that something for my PC or for the SAS GRID server?)? Or do I need something else to be able to do this export?

rogerjdeangelis
Barite | Level 11

Hi Team

 

 This is OT because it interfaces SAS and R, so I just providing a link. You can export multiple SAS dataets to one access database without the SAS Access to PC-Files product. You do not need to worry abut bitness, however it is a good idea to have a macro inerface to 64 and 32bit R.

 

Probaly not useful for this list.

 

Here is the link

 

https://listserv.uga.edu/cgi-bin/wa?A2=SAS-L;a0f31ec3.1607c

SASKiwi
PROC Star

You can use a LIBNAME with Access without the PC Files Server if you have the Microsoft ACE database components (free download from Microsoft) installed on the same computer as your SAS installation. You just need to make sure the bitness matches: 32bit ACE with 32bit SAS or 64bit ACE with 64bit SAS.   

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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
  • 6 replies
  • 2434 views
  • 5 likes
  • 6 in conversation