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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1727 views
  • 1 like
  • 4 in conversation