BookmarkSubscribeRSS Feed
Badshaah
Obsidian | Level 7
Hi friends , there is a requirement of multiple file have different locations are export to excel ..each file to each sheet ... Mainly we want on proc report if possible.
5 REPLIES 5
rogerjdeangelis
Barite | Level 11
This will create sheets 'class' and 'shoes' at A1


ods excel file="d:/xls/rpt1.xlsx";
ods excel options(sheet_name="class" start_at="A1");
proc report data=sashelp.class;
run;quit;

ods excel options(sheet_name="shoes" start_at="A1");
proc report data=sashelp.class;
run;quit;
ods excel close;

SuryaKiran
Meteorite | Level 14
Is your question as follows:
You have different files(e.g .txt or .csv) in different locations. Now you want them in one excel with multiple sheets.
If not please be clear on your question.
Thanks,
Suryakiran
Badshaah
Obsidian | Level 7
Yes exactly, different file at different locations in same excel with savings at different sheets as per file.
SuryaKiran
Meteorite | Level 14

Use INFILE in datastep to create datasets from the raw files in differnt location and then use ODS TAGSETS to create multi-sheets workbook.

FYI: http://support.sas.com/resources/papers/proceedings12/276-2012.pdf 

Thanks,
Suryakiran

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
  • 5 replies
  • 917 views
  • 1 like
  • 4 in conversation