BookmarkSubscribeRSS Feed
yonib
SAS Employee
Hi,
Im using tagsets excelxp with the following options:
OPTIONS( embedded_titles='yes' embedded_footnotes='yes' Autofit_Height= 'YES' );

In the code im having a title statment like this:
title1 j=left color=black underline=1 "I.L.D INSURANCE CO. LTD " j=center color=black " BORDERAU FOR REINSURANCE FOR MONTH &date_run";

in the output the results are 2 titles instead of 1:
The first title is I.L.D INSURANCE CO. LTD and the second (below the first title):
BORDERAU FOR REINSURANCE FOR MONTH &date_run.

How can i get the title to be one and not seperated like, like i get if im using ods html?

Thanks in advance
4 REPLIES 4
Cynthia_sas
SAS Super FREQ
Hi:
You may have to work with Tech Support on this question. I do not know whether it is possible to have 2 separate strings in a SAS TITLE statement behave the way you want with TAGSETS.EXCELXP. For example, if you compare the behavior of the ODS HTML output with the ODS MSOFFICE2K output with regard to the text strings in the program below, you will see the the Microsoft "flavor" of HTML exhibits the same behavior as the Microsoft "flavor" of XML.
[pre]
ods html file='c:\temp\testtitle_ht4.xls' style=sasweb;
ods msoffice2k file='c:\temp\testitle_mso.xls' style=sasweb;
ods tagsets.excelxp file='c:\temp\testtitle.xls' style=sasweb
OPTIONS( embedded_titles='yes' embedded_footnotes='yes' Autofit_Height= 'YES' );

title1 j=left color=black underline=1 "I.L.D INSURANCE CO. LTD " j=center color=black "BORDERAU FOR REINSURANCE FOR MARCH";
proc print data=sashelp.shoes(obs=5);
var region subsidiary product sales inventory returns;
run;

ods _all_ close;
[/pre]

So it seems to be a Microsoft-specific interpretation of the text strings that makes this behavior happen. However, if I just insert some extra spaces in the title string, as shown below (instead of 2 separate quoted strings) -- Excel and TAGSETS.EXCELXP seem to respect the extra spaces.

cynthia
[pre]
ods tagsets.excelxp file='c:\temp\testtitle3.xls' style=sasweb
OPTIONS( embedded_titles='yes' embedded_footnotes='yes' Autofit_Height= 'YES' );
ods escapechar='^';

title1 j=left color=black underline=1 "I.L.D INSURANCE CO. LTD BORDERAU FOR REINSURANCE FOR MARCH";
proc print data=sashelp.shoes(obs=5);
var region subsidiary product sales inventory returns;
run;

ods _all_ close;
[/pre]
yonib
SAS Employee
Hi Cynthia,
Thanks for your help!

I will talk with the Tech Support and i will ask them if its possible to do 2 separate strings in a SAS TITLE statement with tagsets.excelxp.


Thanks for your attantion.
deleted_user
Not applicable
Hi..

Use 2 title statements :

ods tagsets.excelxp file='c:\temp\testtitle.xls' style=sasweb
OPTIONS( embedded_titles='yes' embedded_footnotes='yes' Autofit_Height= 'YES' );
PROC REPORT DATA=sashelp.shoes NOWINDOWS CENTER;
title1 "I.L.D INSURANCE CO. LTD ";
title2 "BORDERAU FOR REINSURANCE FOR MARCH";
run;
ods tagsets.excelxp close;
yonib
SAS Employee
Hi AR,

I know how to get 2 title statments.....
I want to get 2 separate strings in a SAS 1 TITLE statement.

Cynthia help me with that, Thanks anyway

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
  • 4 replies
  • 888 views
  • 0 likes
  • 3 in conversation