ODS and Base Reporting

Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!
BookmarkSubscribeRSS Feed
data_null__
Jade | Level 19

I would like to reduce the space around the data in a cell, cell padding I think, in the header and column but I can't seem to do it.

 

This is the default appearance.  I would like less space between the data and the cell border.

Screenshot 2021-09-17 142126.png

I can use padding options and the cell get smaller but padding appears unchanged.

Screenshot 2021-09-17 142950.png

 

ods powerpoint file="cellpadding.pptx";
proc report data=sashelp.class(obs=8) style(CALLDEF COLUMN HDR HEADER LINES REPORT SUMMARY)=[bordercolor=red];
   columns _all_;
   define _all_ / display;
   run;
proc report data=sashelp.class(obs=8)
      style(CALLDEF COLUMN HDR HEADER LINES REPORT SUMMARY)
         =[cellpadding=0pt bordercolor=red paddingleft=0pt paddingright=0pt paddingbottom=0pt paddingtop=0pt]
         ;
   columns _all_;
   define _all_ / display;
   run;

 

 

4 REPLIES 4
ballardw
Super User

Did you see if the HTML or maybe a PDF or RTF version looks different? It may be something in the Powerpoint destination where MicroSoft is "protecting" you from removing too much space.

data_null__
Jade | Level 19

@ballardw wrote:

Did you see if the HTML or maybe a PDF or RTF version looks different? It may be something in the Powerpoint destination where MicroSoft is "protecting" you from removing too much space.


This is default PDF.

Screenshot 2021-09-17 160557.png

This is PDF with CELLPADDING=0.  

Screenshot 2021-09-17 160700.png

ballardw
Super User

@data_null__ wrote:

@ballardw wrote:

Did you see if the HTML or maybe a PDF or RTF version looks different? It may be something in the Powerpoint destination where MicroSoft is "protecting" you from removing too much space.


This is default PDF.

Screenshot 2021-09-17 160557.png

This is PDF with CELLPADDING=0.  

Screenshot 2021-09-17 160700.png


So it does seem that Powerpoint is limiting how close the values get to the cell borders. You might make a quick trial with CELLSPACING=0 for the Powerpoint and see if that makes a difference. I'm not on a machine with Powerpoint so can't actually test that.

data_null__
Jade | Level 19

@data_null__ wrote:

I would like to reduce the space around the data in a cell, cell padding I think, in the header and column but I can't seem to do it.

 

This is the default appearance.  I would like less space between the data and the cell border.

Screenshot 2021-09-17 142126.png

I can use padding options and the cell get smaller but padding appears unchanged.

Screenshot 2021-09-17 142950.png

 

ods powerpoint file="cellpadding.pptx";
proc report data=sashelp.class(obs=8) style(CALLDEF COLUMN HDR HEADER LINES REPORT SUMMARY)=[bordercolor=red];
   columns _all_;
   define _all_ / display;
   run;
proc report data=sashelp.class(obs=8)
      style(CALLDEF COLUMN HDR HEADER LINES REPORT SUMMARY)
         =[cellpadding=0pt bordercolor=red paddingleft=0pt paddingright=0pt paddingbottom=0pt paddingtop=0pt]
         ;
   columns _all_;
   define _all_ / display;
   run;

 

 


Bump.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 2117 views
  • 0 likes
  • 2 in conversation