BookmarkSubscribeRSS Feed
JackHamilton
Lapis Lazuli | Level 10
This code:

=====
/* Get latest copy of tagset from SAS web site */
filename tagset http
'http://support.sas.com:80/rnd/base/topics/odsmarkup/excltags.tpl';
%include tagset / nosource2;

ods tagsets.excelxp file='c:\sas\programs\excelxp\ex5.xls' options(sheet_interval='bygroup' contents='yes');

proc sort data=sashelp.class out=classbysex;
by sex;
run;

proc report data=classbysex nofs missing;
column sex n name age height weight;
define sex / order noprint;
define n / noprint;
break after sex / page;
run;

ods tagsets.excelxp close;
=====

produces a large number (perhaps until the computer runs out of electrons) of error messages:

=====
22976 proc report data=classbysex nofs missing;
22977 column sex n name age height weight;
22978 define sex / order noprint;
22979 define n / noprint;
22980 break after sex / page;
22981 run;

NOTE: Multiple concurrent threads will be used to summarize data.
WARNING: In Event: write_contents_entries, Invalid Expression: do /while $entry_count <= $content_values
WARNING: In Event: write_contents_entries, Invalid Expression: do /while $entry_count <= $content_values
WARNING: In Event: write_contents_entries, Invalid Expression: do /while $entry_count <= $content_values
WARNING: In Event: write_contents_entries, Invalid Expression: do /while $entry_count <= $content_values
WARNING: In Event: write_contents_entries, Invalid Expression: do /while $entry_count <= $content_values
WARNING: In Event: write_contents_entries, Invalid Expression: do /while $entry_count <= $content_values
WARNING: In Event: write_contents_entries, Invalid Expression: do /while $entry_count <= $content_values
WARNING: In Event: write_contents_entries, Invalid Expression: do /while $entry_count <= $content_values
=====

etc.

This happens on Windows, doesn't happen on MVS.

Specifying index='yes' causes an unloadable file to be created. Specifying contents_workbook='all' doesn't cause any errors, but also doesn't create any contents sheets.
2 REPLIES 2
Eric_SAS
SAS Employee
Thanks. I'll take a look. I just used this the other day so I'm surprised it's not working.
Eric_SAS
SAS Employee
Hi Jack,

I have a fix for you. There were various problems. I'm not sure if it was a compatibility issue with report or a combination of that with a few other strange behaviors. We are currently testing it to make sure it's good to go.

The individual table entries are still missing from the contents worksheet. That could be a proc report compatibility issue. I haven't tracked that down yet. It does successfully create both a contents and an index and everything links the way it should.
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1761 views
  • 0 likes
  • 2 in conversation