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
SAS Super FREQ

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

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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