From: maryann on
Dear SAS guru,

I am using the SAS code below to generate multi-sheet excel reports
using SAS ODS Tagset.
However, I received the error message says:
"Problems came up in the following areas during load:
Style"


I get the same error message if I change the style to XLsansprinter.

ods listing close;
ods tagsets.ExcelXP path="&OutPut" file="&OutputFile..xml"
style=statistical;
ods tagsets.ExcelXP options(embedded_titles='yes'
embedded_Footnotes='yes' suppress_bylines='yes'
auto_subtotals='yes' INDEX='Yes');
Title;
Footnote;

ods listing close;
ods tagsets.ExcelXP path="&OutPut" file="&OutputFile..xml"
style=XLsansprinter;
ods tagsets.ExcelXP options(embedded_titles='yes'
embedded_Footnotes='yes' suppress_bylines='yes'
auto_subtotals='yes' INDEX='Yes');
Title;
Footnote;
run;
%macro
rpt(classvar,table1,WHERE1,format1,format2,FORMAT3,format4,format5,
label1, Title1,tab);
ods tagsets.ExcelXP options(sheet_interval='Proc' sheet_name="&TAB");
proc tabulate data=&infile format= 6.;
class POLICY_STATUS &Classvar;
&wHERE1;
&format1
&format2
&format3
label all='Total' freq='Policy Count' POLICY_STATUS="POLICY_STATUS"
Rowpctn='PERCENT' sum='';
&label1
var freq;
table &table1,(POLICY_STATUS*Rowpctn='PERCENT')
freq*Sum=''*f=comma10.
/rts=18 box=_page_ row=float misstext="."; title &Title1 ;run;

%mend;

%rpt(Channel ACCT_TYPE_CD DCSN_LTV_RT,
Channel*(ACCT_TYPE_CD)*DCSN_LTV_RT ALL,
where GOVT_INSURED='N';,
format1=format Channel $Channel.;,format2=FORMAT ACCT_TYPE_CD
$MTG_INVESTOR_GROUP.;, format3=FORMAT DCSN_LTV_RT
LTV.;,FORMAT4=,FORMAT5=,
label1=label Channel="Channel" ACCT_TYPE_CD="MTG INVESTOR GROUP"
Corr_apprv="Authority?";,
Title1='Policy Status by Channel,MTG INVESTOR GROUP
&Authority',tab=CHAN_INV_LTV);


ods tagsets.ExcelXP close;