Desktop productivity for business analysts and programmers

Can i export one file to Microsoft access with multiples tables?

Reply
Occasional Contributor
Posts: 6

Can i export one file to Microsoft access with multiples tables?

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

Super User
Posts: 19,080

Re: Can i export one file to Microsoft access with multiples tables?

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;

Community Manager
Posts: 2,889

Re: Can i export one file to Microsoft access with multiples tables?

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.

Super User
Posts: 19,080

Re: Can i export one file to Microsoft access with multiples tables?

Thanks @ChrisHemedinger

 

The libname syntax would be

 

libname out PCFiles path='path to file';

Occasional Contributor
Posts: 16

Re: Can i export one file to Microsoft access with multiples tables?

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?

Valued Guide
Posts: 505

Re: Can i export one file to Microsoft access with multiples tables?

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

Super User
Posts: 3,233

Re: Can i export one file to Microsoft access with multiples tables?

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.   

Ask a Question
Discussion stats
  • 6 replies
  • 381 views
  • 5 likes
  • 6 in conversation