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

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1771 views
  • 1 like
  • 4 in conversation