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.......
Thanks.
Hi, I posted a response over here:
https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-remove-the-blank-rows-from-EXCEL-report...
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.
cynthia
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.