I am trying to post new observation from new page in Excel sheet using proc report but BREAK does not seem to work here.
I have attached the report that I am receiving right now. The highlighted ID and the following details, need to start from new page.
Can someone please help me here. SAS Version 9
My code -
ODS TAGSETS.EXCELXP                                     
   FILE = REPORT2                                      
   RS=NONE                                              
   OPTIONS                                              
   (                                                    
    ABSOLUTE_COLUMN_WIDTH= "30,30"                      
    ROW_HEIGHTS          = '0,0,10,0,0,0,0'             
    ORIENTATION          = 'LANDSCAPE'                  
    ZOOM                 = '100'                        
    EMBEDDED_TITLES      = 'YES'                        
    EMBEDDED_FOOTNOTES   = 'YES'                        
    MISSING_ALIGN        = 'CENTER'                     
    SHEET_NAME           = 'Participant Basic Info'     
    SHEET_INTERVAL       = 'PROC'                       
   );                                                   
                                                        
TITLE1 justify=c &T1;                                   
TITLE2 justify=c &T2;                                   
                                                                     
PROC REPORT DATA = AU MISSING SPLIT='*'                              
 STYLE(HEADER)={BACKGROUND=BLUE COLOR=WHITE FONT_WEIGHT=BOLD         
                BORDERWIDTH=2 BORDERCOLOR=BLACK BORDERSTYLE=SOLID}   
 STYLE(COLUMN)={BACKGROUND=WHITE COLOR=BLACK FONT_WEIGHT=BOLD        
                BORDERWIDTH=2 BORDERCOLOR=BLACK BORDERSTYLE=SOLID};  
    BY                                                               
       ID                                                          
       ;                                                             
    COLUMN                                                           
         ID                                                       
         ITEM                                                        
         VALUE                                                       
         ;                                                           
                                                                     
    DEFINE ID / GROUP  NOPRINT style={just=center};                 
DEFINE ITEM  / ORDER=DATA 'Field Description' style={just=center      
                          };                                
DEFINE VALUE / ORDER=DATA 'Field Value' style={just=center  
                                          tagattr='wrap:yes'
                                     };                     
LABEL ID = 'Participant ID';
    BREAK AFTER ID/PAGE;        
                                 
RUN;                             
                                 
ODS TAGSETS.EXCELXP CLOSE;       
                                 
ODS LISTING;                    
Excel does not have the concept of pages other than in the Print Preview setting. In the lower right corner of Excel you will find some buttons, one is Normal - default view, the next is Page Layout - this will show you a paged representation as it would appear if you printed it. To be honest I have no idea if you can control print preview options from SAS in this way, nor will Excel normally do this for you. If you want nice printed output or paged output use an output destination appropriate to the task, e.g. rtf or pdf. Excel is a spreadsheet not a word processor.
Hey
Thanks for the reply. Tried using it but didn't work.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.