I managed to do this in this manner: 1) put the comments in a dataset 2) export the comments to an Excel worksheet I used the code below (dequote and resolve are used to properly handle macro variables). What is your opinion on this method? data explanation (drop=text); format contents $1000.; input text $80.; contents=dequote(resolve(quote(text))); datalines; Description of the contents --------------------------------------------------------------------- file created by &sysuserid. this xlsx file contains data about important stuff ; run; proc export data= work.explanation outfile="c:\myexcelfile.xlsx" dbms=xlsx replace; putnames=no; sheet=explanation; run; 29-3-2016 addition: I discovered some improvements. I might be better to use sql and insert to generate the dataset.
... View more