ODS and Base Reporting

Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!
BookmarkSubscribeRSS Feed
juan1marioo
Calcite | Level 5

Is there a way to delete the empty row that generates between proc reports in an excel when using ods excel. I know you can use skip_space with ods tagset.excelxp, but I need an xlsx file. Thanks!!

6 REPLIES 6
Cynthia_sas
SAS Super FREQ

Hi:
Are you generating with sheet_interval='none' as a sub-option? do you have titles turned on? Can you show an example of the code, including ODS statements that you're submitting? Are you using Statistical Procedures along with PROC REPORT? The usual behavior is for every separate PROC REPORT to start a new sheet in the workbook.

If this is a fairly standard number of rows in each PROC REPORT, then you can figure out which one of the rows you want to "hide" using a suboption, as shown below:

Cynthia_sas_0-1629910832234.png


Cynthia

juan1marioo
Calcite | Level 5
They're all on the same sheet. I need them deleted unfortunately, not just hidden.
Cynthia_sas
SAS Super FREQ
Hi:
Unfortunately, without seeing your data or your code, it's hard to make suggestions. Can you concatenate the data together so that one PROC REPORT will generate what you need? Otherwise, there's not an option that I recall that will do what you want.
Cynthia
Ksharp
Super User

Check option 'start_at='.

 

https://blogs.sas.com/content/sgf/2017/02/20/tips-for-using-the-ods-excel-destination/

 

CODE UNTESTED


ods excel file='c:\temp\temp.xlsx' options(sheet_interval='none');
proc print data=sashelp.class(obs=4);
run;

ods excel options(start_at="1,6");
proc print data=sashelp.heart(obs=10);
run;
ods excel close;

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
  • 6 replies
  • 2876 views
  • 1 like
  • 4 in conversation