BookmarkSubscribeRSS Feed
jasu
Fluorite | Level 6

Hello,

 

Is it possible to remove the blank row that appears after output tables when using ODS EXCEL with the SHEET_INTERVAL='NONE' option?

 

In the ExcelXP tagset, there had been a SKIP_SPACE option to control this feature, but as documented in Chevell Parker's excellent "Ringside Seat" article (https://support.sas.com/resources/papers/proceedings16/SAS5642-2016.pdf), the SKIP_SPACE option is not available in ODS EXCEL.

 

Example code:

 

data test;
	i = 1;
run;

ods _all_ close;
ods excel file="&OUTFILE"
	options(
		sheet_interval='none'
		/*skip_space='0,0,0,0,0'*/  /* not supported in ODS Excel */
	);

proc report data=test; run;
proc report data=test; run;

ods _all_ close;

 

Resulting Excel file:

blank_row.png

 

 

Thanks,

 

Jake

 

2 REPLIES 2
Cynthia_sas
Diamond | Level 26

Hi:

  Possibly restructure the data? Do you want the header for i to be repeated? Here's one way of doing it:

restructure_data.png

 

and here's another way using the same work.final data with a compute block to write the "fake" headers before each group:

with_hdr.png

 

Or, stick with ODS TAGSETS.EXCELXP. Or change the report requirements. I frequently find that if the time to perform the extra "cosmetics" will take as much time as getting the report in the first place... sometimes report users become much more flexible on the cosmetic requirements.

 

cynthia

JRoman
Obsidian | Level 7

Thanks for the tips, Cynthia!

 

Unfortunately, the actual data sets I'm working with in the report do not lend themselves well to combining into a single data set (different numbers of columns, different data types, different formats, etc. -- sorry, the demo example I gave was probably too trivial).

 

I also cannot switch back to ODS TAGSETS.EXCELXP because the output needs to be an XLSX file instead of XML.

 

I'll see if I can change the report requirements.

 

Do you know if there are any plans to implement the SKIP_SPACE option in a future release of ODS EXCEL?  I frequently found it to be a pretty useful feature in the tagset.

 

Thanks,

 

Jake

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
  • 2 replies
  • 2755 views
  • 0 likes
  • 3 in conversation