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.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
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.   

sas-innovate-2024.png

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.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1494 views
  • 5 likes
  • 6 in conversation