BookmarkSubscribeRSS Feed
fadel
Calcite | Level 5

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 ?

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Hi,

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

viveklanka
Fluorite | Level 6

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.. !

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 2 replies
  • 757 views
  • 0 likes
  • 3 in conversation