BookmarkSubscribeRSS Feed
SASAna
Quartz | Level 8

I am working on appending the data through loop and PROC REPORT and ODS EXCEL methods.

 

I am successful in appending the data  but i am getting a blank rows after each iterations of proc report which is after 1000 lines of data. how to delete or suppress that blank lines?

 

Let me know if you need any additional information.

3 REPLIES 3
Cynthia_sas
SAS Super FREQ

Hi:

  Without code or seeing what you describe, it is hard to comment. From what you describe, however, I imagine a HUGE worksheet with 1000 rows, a blank line (after the first PROC REPORT) and then another 1000 rows from a second PROC REPORT) ? 

 

  Even when I have very dedicated users, their tolerance for scrolling through thousands of rows was limited. So I have to wonder whether delivering a worksheet without ANY reader breaks is a good idea.

 

But, without data to test or the code that produces the output, or an example of the current results vs the final desired result, it is hard to know whether the blank line is generated by PROC REPORT or whether the blank line is the result of the normal processing when you use sheet_interval='none', as shown if you run the code below.
 
ods excel file='c:\temp\tworeports.xlsx'
    options(sheet_interval='none');
proc report data=sashelp.class;
  title '1) first';
  column name age height sex weight;
 run;
 
proc report data=sashelp.shoes(obs=25);
  title '2) second';
  column region product sales inventory returns;
 run;

 

The output:

two_report_blank_line_excel.png

 

 

  If you run this code, you will observe 1 blank line between the first output from PROC REPORT for SASHELP.CLASS and the second output from PROC REPORT for SASHELP.SHOES. That blank line is NOT coming from PROC REPORT. That blank line is the normal division between 2 procedures.

 

  Whether you can get rid of this blank line (if this is what you are referencing, is a question for Tech Support.

 

cynthia

SASAna
Quartz | Level 8

Thanks for the reply Cynthia.

 

Due to the MAX # of attributes (around 400) ODS EXCEL is limiting the # of rows to 1200, so i added a logic of loop of 1000 records to test. It works really fine, but with the bug of blank line.

 

You are correct . Excel output is  like this format - 

 

Header 

1000 Rows 

A blank line

1000 Rows

A blank line

1000 Rows

A blank line

 

Was searching a way with lot of options but nothing worked till now.

 

Thanks

 

 

 

Cynthia_sas
SAS Super FREQ
HI:
As I indicated, PROC REPORT is not at fault here and what you observe is not a "bug" -- it is the normal division between every procedure. It would not matter if you had a PROC REPORT, followed by a PROC MEANS, followed by a PROC TABULATE, if you put all the output into one worksheet, there is usually some kind of "break" between each procedure.

cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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