BookmarkSubscribeRSS Feed
Calcite | Level 5

I am creating the EXCEL report using SAS ODS HTML. Somehow the title1 and title2 are wrapping up in column A in row 1 and row 2. Somebody suggested me that  there's a SAS employee named Cynthia who knows ODS inside and out, so maybe she'll check it out.  My code looks like this:


%MACRO print_report ;

          %LET myear  = 2015;
          %LET mpart2 = TABLE R37. Number of nonfatal occupational injuries and illnesses involving;
          %LET mpart3 = days away from work^{super 1} by industry and age of worker, private industry,;
          title1 "Table with row headers in column A and column headers in rows 2 through 3";
          title2 "&mpart2 &mpart3 &myear";



Cynthia, if you are looking at my question, can you please help me out.  OR ANYBODY ELSE.......






Hi, I posted a response over here:

You did not post the rest of your report. The macro program %print_report does NOT do anything by itself. You only show your titles. You don't show any code or what the rest of your report program looks like, how many columns you have on the report or how wide the report is.
As you can see from my example, below, HTML4 treats the title the worst. The other 3 destinations treat it better. I think that both ODS TAGSETS.EXCELXP and ODS EXCEL have ways to control the titles and how many columns that they span. You'd have to check more in the documentation.

I still recommend that you switch to something other than ODS HTML.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 1 reply
  • 2 in conversation