The SAS Output Delivery System and reporting techniques

SAS 9.4: Adding leading/extra spaces in the title using ods tagsets.excelxp

Reply
Contributor
Posts: 55

SAS 9.4: Adding leading/extra spaces in the title using ods tagsets.excelxp

Hi,

I want to add leading/extra spaces in the title using ods tagsets.excelxp. Please find the below code wherein I am trying add extra spaces in "Title4" which is the continuation and want to break to the next line with leading spaces but there is no impact in the output. Please help.

ods tagsets.excelxp

file="c:\temp\test.xls"

style=Printer

options

(Sheet_Name = "test"

Orientation = 'landscape'

FitToPage = 'yes'

Embedded_Titles = 'yes'

Frozen_Headers = '8'

Absolute_Column_Width = '15'

);

Title1 j=l bold "Project.......: XXXXXX";

Title2 j=l bold "Name.........: Age";

Title3 j=l bold "Text...........: Data shown below is from Class V.";

Title4 j=l bold "                  If weight is greater than 90 then send them to Medical check up.";

proc report data = sashelp.class;

run;

ods tagsets.excelxp close;

Desired Output:

Project.......: XXXXXX

Name.........: Age

Text...........: Data shown below is from Class V.

                   If weight is greater than 90 then send them to Medical check up.

SAS Super FREQ
Posts: 8,721

Re: SAS 9.4: Adding leading/extra spaces in the title using ods tagsets.excelxp

Hi:

  I think this might be a question for Tech Support. I am not sure that you can specify an indent in any way that is respected by Excel when it opens the output file. You can see from this screen shot that the LEFTMARGIN= attribute works in some destinations (like HTML and PDF, but their units to move the margin will need to be different). However, Excel clearly does not use the LEFTMARGIN attribute information even a little bit.

       

  Here are the TITLE statements I used:
       

ods escapechar='^';

Title1 f='Courier New' j=l bold "Project.......: XXXXXX";

Title2  f='Courier New' j=l bold "Name.........: Age";

Title3  f='Courier New' j=l bold "Text...........: Data shown below is from Class V.";

Title4 j=l f='Courier New'  bold

    "^{style[leftmargin=1.8in]If weight is greater than 90 then send them to Medical check up.}";

                                       

cynthia


leftmargin_works_not_all_dest.png
Ask a Question
Discussion stats
  • 1 reply
  • 423 views
  • 0 likes
  • 2 in conversation