BookmarkSubscribeRSS Feed
1239
Calcite | Level 5

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.

1 REPLY 1
Cynthia_sas
SAS Super FREQ

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

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
  • 1 reply
  • 1960 views
  • 0 likes
  • 2 in conversation