DATA Step, Macro, Functions and more

how to add leading blank spaces to Title statement

Reply
Contributor
Posts: 27

how to add leading blank spaces to Title statement

Can someone explain  how to add  Leading Blank spaces to Title Statement   while left justifying the Title.

 

Thanks,

MG

SAS Super FREQ
Posts: 8,862

Re: how to add leading blank spaces to Title statement

[ Edited ]
Posted in reply to mgorripati

Hi:
The answer will depend on your destination of interest (HTML, PDF, RTF)? Why do you need leading spaces if you are left-justifying the title (just curious).

cynthia

 

Here's an example for the 3 primary destinations:

leading_spaces_title.png

Contributor
Posts: 27

Re: how to add leading blank spaces to Title statement

Posted in reply to Cynthia_sas

Cynthia,  thanks for the response  and sorry for not providing complete deltails.

 

I want to add few Leading blank spaces to the Title in my excel report generated by PROC REPORT using tagsets.ExcelXP.

 

TITLE  J=LEFT "           " "Total  Members = &client_cnt";

 

I want the Total Members to be displayed starting from 2nd or 3rd column . providing space in TITLE statment  is not working when i am left justifying it .

 

Thanks,

MG

SAS Super FREQ
Posts: 8,862

Re: how to add leading blank spaces to Title statement

Posted in reply to mgorripati
Hi:
I am not sure that TAGSETS.EXCELXP will use the ESCAPECHAR and {NBSPACE} technique that works with other destinations. You might need to work with Tech Support on this. I think that once you are in Excel, you can indent a cell, but I am not sure you can insert leading spaces and have Excel use the leading spaces when opening the file.

cynthia
Super User
Posts: 11,343

Re: how to add leading blank spaces to Title statement

Posted in reply to mgorripati

A possibly confusing approach might be to try null characters (ASCII 255). You often can type them into the editor by holding down the alt key and then use the NUMERIC key pad to type 255 and release the alt key (for each character). What gets seen may depend on the active font but mostly it looks like a space and generally doesn't get stripped like a space does.

 

 

Super User
Posts: 10,018

Re: how to add leading blank spaces to Title statement

Posted in reply to mgorripati
Can you just add some TAB characters before it ?


TITLE " '09'x   '09'x  '09'x  '09'x    xxxxxxxx";

Ask a Question
Discussion stats
  • 5 replies
  • 579 views
  • 0 likes
  • 4 in conversation