DATA Step, Macro, Functions and more

exporting several sas tables in a single excel file

Reply
Contributor
Posts: 32

exporting several sas tables in a single excel file

Hello,

I used 4 sql procedures to create 4 tables, and i want to export all this tables in a single excel file but i don't know how !!

is there any thing to merge my 4 table (many colomnes and one row in all of it) before exporting ? if not, how can export it in one excel file ?

Super User
Super User
Posts: 7,395

Re: exporting several sas tables in a single excel file

Hi,

This question appears on these forums many times.  Please use the search facility, "exporting multiple dataset to excel" gives these as first hits:

Occasional Contributor
Posts: 19

Re: exporting several sas tables in a single excel file

If you want to use proc export you can do this way.,

Proc export data= dataset

outfile="location and file name.xlsx"

dbms=xlsx replace; sheet='sheetname';run;

Giving a different sheetname for every new export statement is importnat so it doesnot override the previous one.

repeat this procedure for any  number of datasets.. !

Ask a Question
Discussion stats
  • 2 replies
  • 163 views
  • 0 likes
  • 3 in conversation