I am trying to create an Excel file using Proc Report and ODS Excel with a column heading that has both a line break and a superscript (column VALUE2). The issue is the line break is being ignored in Excel, but it works properly in HTML (SAS Output window). My output needs to be an Excel file because it eventually is being converted to a PDF (and the specialized process needs Excel as input). Using two line breaks works fine Using two superscript notations works fine Below is a stripped down/simplified version of the program I am trying to run. I have tried running this in SAS 9.2 and 9.4 with similar results. Any help on how to make both notations work together would be greatly appreciated. ata mytable;
realrow = '01';
value1 = 34;
value2 = 19;
output;
realrow = '01';
value1 = 12;
value2 = 55;
output;
run;
proc format;
value $ tab12fmt
'01' = 'Total, all items';
run;
ods excel file="H:\mytab.xlsx";
options missing='' nodate;
ods escapechar='~';
title "My Table 1";
proc report data=mytable missing;
label value1 = 'Amount~n(thousands of~ndollars)'
value2 = "Average per~nangler(dollars)~{super 2}";
column realrow value1 value2;
define realrow / format=$tab12fmt. ;
define value1 / style(header)=[just=r]
style(column)=[borderrightcolor=white
borderrightwidth=0];
define value2 / style(header)=[just=r]
style(column)=[borderleftcolor=white
borderleftwidth=0 borderrightcolor=white
borderrightwidth=0];
compute realrow;
call define(_row_,'style','style=[bordertopcolor=white bordertopwidth=0
borderbottomcolor=white borderbottomwidth=0
font_weight=bold]');
endcomp;
run;
ods excel close;
... View more