SAS 9.4 TS1M5
I am trying to figure out a way of exporting an excel worksheet within the same workbook as my data output that is text only. This worksheet would be a glossary of terms and general information regarding the data. In the past, I have just used extensive footnotes, but I have reached the footnote limit as the amount of data definitions needed to provide to the customer is rather extensive in this case.
I am using ods excel to export. I believe that I could create this using datalines and I am sure that most likely needs to be part of it unless I stored the text in a separate txt file and imported it which can be done, but ultimately I don't want this to appear as a table per se in the excel - no presence of a label or field name.
I assume that this is a pretty easy request, but I haven't been able to find an example that really fits what I am looking for. Does anyone have experience with creating something like this?
Thank you.
Apologies if I'm misunderstanding but what your asking in the title; to me contradicts what your saying you want.
I am trying to figure out a way of exporting an excel worksheet within the same workbook as my data output that is text only.
Are you just wanting like a readme.txt file? If so you can export to .txt:
data _null_;
set sashelp.class;
file "c:\temp\someFile.txt";
put name age sex;
file print;
put name age sex;
run;
If your just trying to input "text" you can use the ODS TEXT= option. Details here: https://documentation.sas.com/?docsetId=odsug&docsetTarget=p14gx25pepks6dn1q9m7vkq3gfoi.htm&docsetVe...
Hopefully one of those helps.
Apologies if I'm misunderstanding but what your asking in the title; to me contradicts what your saying you want.
I am trying to figure out a way of exporting an excel worksheet within the same workbook as my data output that is text only.
Are you just wanting like a readme.txt file? If so you can export to .txt:
data _null_;
set sashelp.class;
file "c:\temp\someFile.txt";
put name age sex;
file print;
put name age sex;
run;
If your just trying to input "text" you can use the ODS TEXT= option. Details here: https://documentation.sas.com/?docsetId=odsug&docsetTarget=p14gx25pepks6dn1q9m7vkq3gfoi.htm&docsetVe...
Hopefully one of those helps.
I don't really want a readme. We'd use that internally, but when it comes to what is sent off, I really just want a way of packaging everything together with the data definitions wrapped into the worksheet itself or into a separate worksheet of the same workbook.
Looks like the ODS TEXT= option is going to work for me though. Thanks!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.