BookmarkSubscribeRSS Feed
Peter_C
Rhodochrosite | Level 12
in tagsets.excelXP v1.94

seems like frozen_headers='yes' ignores the setting of embedded_titles='yes', or am I missing something?

From "doc='help' : [pre]Frozen_Headers: Default Value 'No'
Values: yes, no, true, false, number.
If 'Yes' The rows down to the bottom of the headers will be frozen when
the table data scrolls. This includes any titles created with the
embedded titles option. If a number is given, that is the row count
that will be frozen[/pre]

So I expected I could lose my "title counter" macro that works out where the column headers will come.
Unfortunately!
Only the top row is frozen.
Here is a brief demo:
ods _all_ close;
title 'demo title1' ;
title2 'frozen_headers=''yes'' ';
ods tagsets.excelxp file='demo.xml.xls' options(sheet_name='frozen_demo' autofilter='all' embedded_titles='yes' Frozen_Headers='yes') ;
proc print data= sashelp.class ;
run ;
proc sql noprint ;* obtaining the number of title lines ;[pre] select max( number)
into :n_titles separated by ' '
from sashelp.vtitle
where type='T'
;[/pre] %let head_at =%eval( 2+&n_titles) ; *proc print column headers are 2 lines after last title ;
quit ;
title2 "frozen_headers='&head_at' ";
ods tagsets.excelxp options(sheet_name='frozen_demo2' autofilter='all' embedded_titles='yes' Frozen_Headers="&head_at") ;
proc print data= sashelp.class ;
run ;
ods _all_ close;

what am I missing?
PeterC
2 REPLIES 2
Eric_SAS
SAS Employee
This does appear to be broken.

Here are the changes to make it work. I'll have a new version out as soon as I can.

The T should be capitalized.

define event add_title_rowcounts;
/*-------------------------------------------eric-*/
/*-- Sure would be nice to be able to do this. --*/
/*-- eval $nskip ^^$skip_factor['title']; --*/
/*----------------------------------------19Aug05-*/
do /if $skip_factor['Title'];


Titles should not be unset at the end of this event...

define event embedded_title;
break /if ^$embedded_titles;
break /if ^$titles;

....

/* unset $titles */
Peter_C
Rhodochrosite | Level 12
many thanks
Running the excelbase template code with these changes resulted in the correct frozen headers, but ...
... perhaps I shouldn't expect to edit the code in the template editor.
suddenly the style became different/minimalist
and it looked like some continued (overflowed) lines joined up a little differently than in the original.
So, I'll look forward to the update, when you can fix it!

Many thanks Eric

peterC

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1198 views
  • 0 likes
  • 2 in conversation