Hi:
Here are some things you can try:
1) make sure you have Excel 2002 or higher (Office 97 or 2000) will not open the type of XML created by TAGSETS.EXCELXP;
2) make sure you have downloaded and installed the most current TAGSETS.EXCELXP tagset template definition, as described here:
http://support.sas.com/kb/32/394.html
3) After #1 and #2 have been done, retest your code. When I run this code (below) using the most current tagset template definition I -do- get a workbook that opens in Excel 2007. Note that some options, such as HEADLINE, SKIP and OL are ignored by ODS destinations, as they are ONLY used for the LISTING window, so they are not in my code. Also, NOWD and NOWINDOWS are the same option.
4) If this "different format" message is the message you're getting:
The file you are trying to open 'somefile.xls' is in a different format than specified by the file extension. Verify the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?
Yes No Help
This is a normal message from Office 2007, and you can just click YES to open the file (or name the file with .XML instead of .XLS and you will not get the message).
http://support.sas.com/kb/31/956.html
5) If you are getting THIS "not valid" message,
Excel cannot open the file 'somefile.xlsx' because the
file format or file extension is not valid. Verify that the file has not
been corrupted and that the file extension matches the format of the file.
you may have accidentally named the file .XLSX, which is a type of file that is NOT created by TAGSETS.EXCELXP. Again, use .XML instead of .XLSX when you use TAGSETS.EXCELXP.
cynthia
My test code:
[pre]
data whole_v2;
set sashelp.prdsale;
where quarter = 1;
terr_id = substr(division,1,3);
productgroup = substr(product,1,1);
total_scripts = actual / 100;
bsm = region;
physician_name = substr(compress(country,'.'),1,2);
run;
ODS TAGSETS.EXCELXP FILE='C:\temp\tagset2.xml'
style=sasweb;
proc report data=whole_v2 nowd MISSING split='/';
COLUMN terr_id bsm physician_name
total_scripts, year, productgroup;
define terr_id/group 'Terr/ID';
define bsm/group;
DEFINE physician_name / group 'Phy/Name';
DEFINE year / across ' ';
DEFINE productgroup / across ' ';
DEFINE total_scripts / sum format=comma12. ' ';
break after terr_id/summarize
style=[font_weight=bold background=red];
run;
ODS TAGSETS.EXCELXP CLOSE;
[/pre]