Been quite some time since I raised my voice on any SAS forum. Experimenting with EXCELXP on z/OS with SAS 9.1.3 this thread caught my attention. Not only this. It actually helped me solve my problem. That is, I am able to produce a multisheet excel file (stored in a zFS file and served through z/OS's web server) with data, labels and even sheet names containing german umlauts.
Let the code speak for itself:
/*------- top of sample code ------*/
x 'umask 002' ;
%include tgs(excelxp) / nosource2 ;
%sysfunc(ifc(&syscc ge 4,%str(endsas;),)) ;
ods listing close ;
%let _dt = %sysfunc(date(),deudfwkx.) ;
%let _tm = %sysfunc(time(),time8. ) ;
%let _fn1 = %sysfunc(getoption(nlscompatmode)) ;
%let _fn2 = %sysfunc(getoption(locale,keyword)) ;
%let _fn3 = %sysfunc(getoption(encoding,keyword)) ;
%let _fn4 = %sysfunc(getoption(dflang,keyword)) ;
data myclass ;
set sashelp.class ;
if name='Barbara' then name='Bärbel' ;
if name='Joyce' then name='Joëlle' ;
label name = 'Vorname'
sex = 'Geschlecht'
age = 'Alter'
height = 'Größe'
weight = 'Gewicht'
;
run ;
title1 h=2 'ExcelXP Tagset MultiSheet Sample' ;
title2 h=1 "erstellt am &_dt, um &_tm Uhr" ;
footnote1 h=5pt "&_fn1 / &_fn2 / &_fn3 / &_fn4" ;
ods tagsets.excelxp file="/srv/sas/tmp/sample_xclxp001.xls"
encoding='ISO-8859-1'
record_separator='0d'x
style=styles.sasweb2
;
ods tagsets.excelxp options
( autofilter = '2-3'
center_horizontal = 'yes'
center_vertical = 'yes'
embedded_footnotes = 'yes'
embedded_titles = 'yes'
frozen_headers = '4'
frozen_rowheaders = '1'
zoom = '180'
) ;
ods tagsets.excelxp options(sheet_name='Mädels') ;
proc print data=myclass noobs label ;
where sex='F' ;
run;
ods tagsets.excelxp options(sheet_name='Jungs') ;
proc print data=myclass noobs label ;
where sex='M' ;
run;
ods tagsets.excelxp close;
/*---------- bottom of sample code --------*/
Needless to say I'm very happy with it!
Kind regards
Robert Bardos