- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If you want specific values in cells you're going to need to change your approach.
If you look you will see that the entire row for line 21 has columns A through E MERGED. You can check the property in Excel if you doubt that.
So LINE is not what you want to use.
Since you have no other column or define statements it hard to tell what your real use case may be but you likely want two columns computed in your compute after