DATA Step, Macro, Functions and more

How export multipe file in same excel with different sheet

Reply
Contributor
Posts: 34

How export multipe file in same excel with different sheet

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.
Super User
Posts: 6,982

Re: How export multipe file in same excel with different sheet

With ods tagsets.excelxp, you can assign the sheetname manually before each proc report step.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Valued Guide
Posts: 505

Re: How export multipe file in same excel with different sheet

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;

Frequent Contributor
Posts: 127

Re: How export multipe file in same excel with different sheet

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
Contributor
Posts: 34

Re: How export multipe file in same excel with different sheet

Yes exactly, different file at different locations in same excel with savings at different sheets as per file.
Frequent Contributor
Posts: 127

Re: How export multipe file in same excel with different sheet

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
Ask a Question
Discussion stats
  • 5 replies
  • 207 views
  • 1 like
  • 4 in conversation