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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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