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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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