Hi
has my forum search missed a posting describing how to proc print negative percentages in excelXP?
I would like similar appearance in both html and excelxp for negatives, like example (5.25%)
Syntax follows to create and use a few negative numbers[pre]ods _all_ close ;
ods listing ;
data test_neg ;
do num = -10 to 11 by 1.23 ;
perc = num /100 ;
output ;
end ;
format num comma8.2 perc percent8.2 ;
run ;
filename rep '!temp\test_neg.html' ;
filename xlp '!temp\test_neg.xml' ;
ods html file= rep style= egdefault ;
ods tagsets.excelxp file= xlp style= egdefault ;
ods tagsets.excelxp options( sheet_name="test_NEG" Convert_Percentages='Yes' ) ;
ods listing ;
proc print data= test_neg ;
id num / style={tagattr='format:#,##0.00'};
var perc / style={tagattr='format:0.00%;[Red]\(0.00%\);'};
run ;
ods _all_ close ;
[/pre]
Is it something to do with how tagsets.excelXP handles negative values output from the percent. format? [pre]( 5.67)[/pre]Is it handled better in SAS9.2?
Using the option Convert_Percentages='Yes' seems to make no difference for negative values. 😞
peterC
p.s.
versions etc, from SASlog
NOTE: This session is executing on the XP_PRO platform.
NOTE: SAS 9.1.3 Service Pack 4
NOTE: This is the Excel XP tagset (SAS 9.1.3, v1.86, 04/15/08).