The SAS Output Delivery System and reporting techniques

Adjusting Excel row heights with CSS?

Accepted Solution Solved
Reply
Contributor
Posts: 38
Accepted Solution

Adjusting Excel row heights with CSS?

My CSS file looks like this

 

tbody tr {
   height: 25px;
}

My SAS code looks like

 

ods excel file=test.xlsx cssstyle=&cssstyle;

proc print data=foo noobs;
run;

ods excel close;

It doesn't seem to have any effect on row heights.


Accepted Solutions
Highlighted
Solution
a month ago
SAS Super FREQ
Posts: 8,957

Re: Adjusting Excel row heights with CSS?

Hi:

  I can't remember if ODS EXCEL uses CSSSTYLE option. That is a question for Tech Support and they will want to see the whole CSS file.

 

  But within ODS EXCEL, you can use the ROW_HEIGHTS sub-option to alter the row heights. It is in the doc. For example, here, I made only the headers taller.

row_heights.png

 

 

cynthia

View solution in original post


All Replies
Super User
Posts: 11,779

Re: Adjusting Excel row heights with CSS?

Posted in reply to tomcmacdonald

What is the value of the macro variable &cssstyle?

 

PX may be a less than ideal unit of measure as PX is dependent on screen resolution  and the file created likely wouldn't know the screen resolution. Have you tried setting an measure such as IN or CM for constant height or PCT if you need some that changes per screen size or resolution?

Highlighted
Solution
a month ago
SAS Super FREQ
Posts: 8,957

Re: Adjusting Excel row heights with CSS?

Hi:

  I can't remember if ODS EXCEL uses CSSSTYLE option. That is a question for Tech Support and they will want to see the whole CSS file.

 

  But within ODS EXCEL, you can use the ROW_HEIGHTS sub-option to alter the row heights. It is in the doc. For example, here, I made only the headers taller.

row_heights.png

 

 

cynthia

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 214 views
  • 0 likes
  • 3 in conversation