The SAS Output Delivery System and reporting techniques

How to stop titles to wrap in excel using sas ods html

Occasional Contributor
Posts: 6

How to stop titles to wrap in excel using sas ods html

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.......





Posts: 8,719

Re: How to stop titles to wrap in excel using sas ods html

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.

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation