Hi:
Interesting. When I run the tagset code from this site:
http://support.sas.com/rnd/base/ods/odsmarkup/sylk.txt
I see the same behavior in Excel (sylk tags). I believe that's because the tagset template at the above site has a Content-type: instruction that is not needed for a local machine environment (usually you only need Content-type and/or Content-disposition if you are delivering content via a web server.)
If you alter the tagset code -- change ONLY the Doc event as shown below:
[pre]
define event doc;
start:
/*
put 'Content-type: application/vnd.ms-excel' nl;
put 'Content-disposition: attachment;filename=rfpcount.sylk' nl nl;
put 'Content-disposition: attachment;inline' nl nl;
*/
put 'ID;PSAS8' nl;
put 'P;F' nl;
put 'P;F;SB' nl;
finish:
put 'E' nl;
end;
[/pre]
Which comments out the 3 PUT statements for Content-type and Content- disposition; and store the modified tagset in SASUSER.TEMPLAT and then run this step:
[pre]
ods tagsets.sylk file='c:\temp \sylk_rept.xls' ;
proc report data=sashelp.shoes nowd;
column region subsidiary sales;
define region /group;
define subsidiary /group;
define sales / sum;
rbreak after /summarize;
title 'my title';
run;
ods tagsets.sylk close;
[/pre]
I notice that the SAS Results Viewer shows me the XML icon and won't launch Excel, even if I give the file an extension of .XLS. However, if I go over to Windows Explorer and open the file from within Explorer, then Excel 2007 correctly reads the SYLK markup tags (without Content-type, etc).
cynthia