BookmarkSubscribeRSS Feed
wikich
Calcite | Level 5

I want to use proc report for exporting my table to rtf file.

for example, my table has five columns named _var_  para col1 col2 col3.

Before writing the pro report, I set the value of ls as 75 in options, like this: options ls=75;

Here I want to set the width of each column as 15, and the sum of all columns width is equal to ls(75).

I see the answer of @Cynthia_sas to set column width like this: style(column)={width=1.5in}, but this solution could not deal

with my problem. I want to known how to set the column width in my problem.

Thanks.

4 REPLIES 4
Ksharp
Super User

First of all,

options ls=75; is not suited for your RTF destination. it is only for LISTING destination.

 

also try

 style(column)={cellwidth=1cm}

style(report)={outputwidth=50%}

wikich
Calcite | Level 5

if proc report data=mydata ls=75, ls in proc report . is it suited for rtf document?

ballardw
Super User

@wikich wrote:

if proc report data=mydata ls=75, ls in proc report . is it suited for rtf document?


The very old LINESIZE, or LS, setting is a number of print positions and basically for a line printer and later fixed width font. It does not actually specify a "width" as the size of the font in a file could change the "width" for any given number of characters.

 

Why does Cynthia's solution "to set column width like this: style(column)={width=1.5in}" not ideal.

Describe why in some detail.  The units can be specified differently if you do not like to use inches.

Cynthia_sas
Diamond | Level 26
NO, Linesize or the LS= option is ONLY a LISTING destination option. It is ignored for RTF.
Cynthia

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1873 views
  • 0 likes
  • 4 in conversation