Hi,
I have a question about using tagsets.excelxp to export with titles embedded.
For example, I have a ten column table on the first worksheet and a two column table on the second worksheet. The first title works perfectly fine on the first worksheet but the second title will be centered based on ten columns instead of two columns.
Anyone can help with that?
Here is my code.
data first;
input a b c d e f g h i j;
cards;
1 1 1 1 1 1 1 1 1 1
;
run;
data second;
input a b;
cards;
1 1
;
run;
ODS TAGSETS.EXCELXP
file="path"
STYLE=journal;
ODS TAGSETS.EXCELXP
OPTIONS (sheet_name='first'
Embedded_Titles = 'yes');
proc print data=first noobs label;
var a b c d e f g h i j;
title1 'This is the title for dataset: First';
run;
ODS TAGSETS.EXCELXP
OPTIONS (sheet_name='Second'
Embedded_Titles = 'yes');
proc print data=second noobs label;
var a b;
title1 'This is the title for dataset: Second';
run;
ods tagsets.excelxp close;
The issue with the titles getting centered based on the number of columns from the first sheet was an issue that was corrected with version 1.131 of the tagset which can be downloaded from the below location.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: