I want to create a title page that has four lines and one image on the right. I haven’t seen any command to put image on tagset.excelxp.
Does anyone have any idea how I could do this.
Tagset.ExcelXP does not support images.
If you need images you'll need to use another method such as ODS HTML or MSOFFICE
Do you know if MSOFFICE has title page?
Sorry, no idea, you'll have to check the docs/papers.
Hi, Usually, with any destination, if you want a TITLE page in the output, you have to make it your self. So in your case, you would make a first sheet in the workbook that contained the text of your title page. There have been some previous forum postings on creating your title page with a DATA step program and then using PROC REPORT or PROC PRINT to create the output.
The only thing that TAGSETS.EXCELXP will give you by default is an index of the sheets in the workbook or a contents of the sheets in the workbook, or both. Use the DOC='HELP' suboption to determine which suboption settings you use for the index vs the contents. The image issue is a Microsoft issue. By MICROSOFT design, the Spreadsheet Markup Language specification, does NOT support images. ODS TAGSETS.EXCELXP conforms to the Microsoft Spreadsheet Markup Language specification. This means no images.
If you want a multi-sheet workbook with images, you will have to investigate the MSOFFICE2K_X destination, that is an HTML-based destination where you can request multi-sheet workbooks. However, if you do not need images, and you want a simple multi-sheet workbook, then the code below will make a 1st sheet that acts as a title sheet using TAGSETS.EXCELXP.
Cynthia
** make some data for a title page;
data title;
length tline $100;
ord=1;
tline='My Title Page';
output;
ord=2;
tline = 'by: Ima Programmer';
output;
ord=3;
tline = "on: &sysdate";
output;
run;
ods _all_ close;
title; footnote;
ods tagsets.excelxp file='c:\temp\withtitlepage.xml' style=sasweb
options(doc='Help' autofit_height='yes' sheet_name='Title');
proc report data=title nowd noheader;
column ord tline;
define ord / order noprint;
define tline / style(column)={font_weight=bold font_face=Arial font_size=20pt just=c cellwidth=6in};
break after ord /;
compute after ord;
line ' ';
line ' ';
line ' ';
endcomp;
compute before;
line ' ';
line ' ';
line ' ';
line ' ';
endcomp;
compute tline;
if ord in ( 2,3) then do;
call define(_col_,'style','style={font_size=14pt just=r font_style=italic}');
end;
endcomp;
run;
ods tagsets.excelxp options(sheet_name='Class');
proc print data=sashelp.class;
run;
ods tagsets.excelxp options(sheet_name='Shoes');
proc print data=sashelp.shoes(obs=5);
run;
ods _all_ close;
Thanks for your help.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.