Currently, I have a data dump report using proc export that I run every so often and all the aggregations are written onto the report e-mail via put() statements.
so pretty much
x.aggre_0 looks like
total 1 total 2 total 3
123 321 567
Current datastep looks like this:
data x.aggr_1;
set x.aggre_0;
call symput("e-mailcontents",
cat('Summary #1:',total 1)
cat('Summary #2:',total 2)
cat('Summary #3:', total 3))
and I just put(&e-mailcontents)
onto my e-mail sas file.
That's the jist of what the process is like now.
Got a new request to add a summary tab to the report rather than inserting all aggregations onto the e-mail. However, I'm not sure as to how i'm going to go about appending text onto a xlsx using proc export. ODS Excel and xlsx engines aren't an option due to constraints beyond my control.
I have my aggregations saved into x.aggre_0, but I'm not sure as to how I'm going to place it in another sheet in the same report.
I was thinking of something along the lines of just creating a new table with one column and just having it show line by line like this, but I have no clue how.
column_name
1 Summary #1: 123
2 Summary #2: 321
3 Summary #3: 567