data class; set sashelp.class; run; PROC SQL; SELECT DISTINCT COUNT(*) + 1 INTO :CNT1 FROM class; Quit; ods _all_ close; ods Excel file="/&path/class.xlsx" STYLE= sasdocprinter options(sheet_name='class' Orientation= "landscape" Absolute_Column_Width="20" Frozen_headers= 'yes' embedded_titles='yes' embedded_footnotes='yes' ); proc report data=class; compute after _page_/ style={just=left}; line @1 "T &CNT1"; endcomp; run; ods excel close; title; footnote; On executing the above code I get the excel sheet as shown in the attachment. If you check the last row i.e. row number 21, I get the "T 20" in the same cell that extends up to column E. But I want the "T" to be in cell "A21" and "20" in cell "B21". Requesting your help to achieve the above. Thanks. Pranita
... View more