BookmarkSubscribeRSS Feed
shellp55
Quartz | Level 8

Hello

 

I am using ods Excel to export multiple worksheets to an Excel document.  Below is the code I am currently using, and it is working well.

ods Excel file=&dad_export_file options(sheet_name="Incons_Demo" Absolute_Column_Width='12,8,8,14,8,12' tab_color="#FABF8F");
proc print data=demo_2f noobs style(Data)=[just=left] style(Header)=[just=center];
var chartno sex bdate HCN_NoVC acctno disdate;
format HCN_NoVC $12. chartno $12. acctno $12.;
run; quit;

ods Excel close;

What I would like is to have the first row, merged to be the width of all 6 columns above, so I can add narrative about what is showing on the report.  Is that possible?  Thanks.

2 REPLIES 2
Reeza
Super User
ODS TEXT statement is a good option or use PROC REPORT with a data set with a specific value that is printed before the PRINT.
shellp55
Quartz | Level 8

Thanks Reeza, but I'm not understanding what you mean.  Where would this statement go in relation to the code I provided?   Thanks so much.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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