BookmarkSubscribeRSS Feed
zqkal
Obsidian | Level 7

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. 

5 REPLIES 5
Reeza
Super User

Tagset.ExcelXP does not support images.

If you need images you'll need to use another method such as ODS HTML or MSOFFICE

zqkal
Obsidian | Level 7

Do you know if MSOFFICE has title page?

Reeza
Super User

Sorry, no idea, you'll have to check the docs/papers.

Cynthia_sas
SAS Super FREQ

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;

zqkal
Obsidian | Level 7

Thanks for your help.

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
  • 5 replies
  • 1188 views
  • 1 like
  • 3 in conversation