BookmarkSubscribeRSS Feed
kishoresamineni
Quartz | Level 8

Hi,

 

I have a business requirement to implement the excel template file in SAS. Where the format should be same as the excel template file. I have done all the reporting and styling of reports same as excel format. But in the excel template file reports are top and bottom. But when i implement the report by using proc report in sas i getting the reports side by side. 

Can any one suggest me how to implement multiple reports top and bottom in same excel sheet.

I have done this but i'm getting the reports side by side.

 

Attachment has Proc template code for ODS Tagsets...

and ods tagsets code is...

ods tagsets.msoffice2k_x path="xxxx\Phoenix"
file="Phoenix.html" style=minimal options(panelcols="9") ;

proc report data=xxx;
....
...
endcomp;
run;

ods tagsets.msoffice2k_x close;

 

ods tagsets.msoffice2k_x path="\xxxx\11_Phoenix"
file="Phoenix.xls" style=journal
options(worksheet_source=
"Units #.\Phoenix.html ,
Volume #.\Phoenix_Vol.html " ) ;

data _null_;
file print;
put _all_;
run;
ods tagsets.msoffice2k_x close;

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Have you tried with ods tagsets.excelxp?  

https://support.sas.com/rnd/base/ods/odsmarkup/excelxp_help.html

https://support.sas.com/rnd/base/ods/odsmarkup/excelxp_demo.html

Or ods excel if you have 9.4 SAS.  These are newer and hence have more functionality.

 

The easiest way I found if your a) forced to use such tosh as Excel, and b) are provided a template, is to do the processing in Excel using VBA.  Export your output data from SAS to CSV file format.  Then write a VBA macro which opens this CSV data and places the information where you want in the Excel file.  The reason is that whilst SAS has madea agreat deal of progress towards intergration with Excel via tagsets.excelxp, and excel, the fact is that Excel is completely unstructured and hence its very difficult to implement every possible connotation - i.e. you might want data to appear above each other, another person might want pictures there etc.

kishoresamineni
Quartz | Level 8

Hi RW9,

 

 

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
  • 2 replies
  • 1046 views
  • 0 likes
  • 2 in conversation