The SAS Output Delivery System and reporting techniques

tagsets.ExcelXP no title for PROC TTEST

Reply
Occasional Contributor akj
Occasional Contributor
Posts: 5

tagsets.ExcelXP no title for PROC TTEST

I am trying to output the results from PROC TTEST on 8 variables using ODS TAGSETS.EXCELXP.  However, the title in between the individual PROC TTESTs does not show up, making it hard to identify the individual variables.

 

ods _all_ close;

 

ods tagsets.ExcelXP path='filepath' file='filename.xml'  style=printer

     options(sheet_interval='Proc'

                  embedded_titles="yes"

                  embedded_footnotes="yes"

                  skip_space='3,0,1,1,1'

                  contents='yes');

options helpbrowser=sas;

 

ods tagsets.ExcelXP options(sheet_name='sheet1');

proc ttest data=data1;

class var1;

var var2 var3 var4 var5 var6 var7 var8 var9;

title 'Proc ttest';

title2 'data1';

run;

ods tagsets.ExcelXP close;

 

In the output from PROC TTEST (not ODS) the first 2 lines are:

 

The TTEST Procedure

Variable: var1

 

This does not transfer to the Excel file.  Why>

Super User
Posts: 17,912

Re: tagsets.ExcelXP no title for PROC TTEST

1. Check your tagsets version - its in the log afte you use ODS Tagsets

2. If not the latest and greatest update it

3. If #1 fails, what version of SAS

4. Post a sample that we can run - ie use SASHELP datasets not your own data since that means I can't run it. 

Occasional Contributor akj
Occasional Contributor
Posts: 5

Re: tagsets.ExcelXP no title for PROC TTEST

The tagset is up-to-date.  I am running SAS 9.4 in a UNIX environment.  Here is the code:

 

footnote 'test ODS';

title 'Birthweight Data';

title2 'sashelp.bweight';

 

ods listing;

ods results;      

proc ttest data=sashelp.bweight;      

  class boy;      

  var weight momage momwtgain ;

run;            

 

ods _all_ close;

ods tagsets.ExcelXP path="[filepath]" file="BWEIGHT_test.xml" style=printer                  

        options(sheet_interval='Proc'                                                

                    embedded_titles="yes"                                                

                    embedded_footnotes="yes"                                                

                    skip_space='3,0,1,1,1'                                                

                    contents="yes");

options helpbrowser=sas;            

 

ods tagsets.ExcelXP options(sheet_name='Weight');            

   proc ttest data=sashelp.bweight;                  

      class boy;                  

      var weight momage momwtgain ;            

   run;            

ods tagsets.ExcelXP close;  

 

I have attached the output of the first PROC TTEST as a txt file and the EXCEL output as a PDF.

Contributor
Posts: 65

Re: tagsets.ExcelXP no title for PROC TTEST

If you are using SAS 9.4 maintenance release 3 or maintenance release 4, you can use ODS EXCEL instead.  

 

The text showing the variable name and label shows up in ODS EXCEL.  But the text wrap and merge and center are different for the first variable and the remaining variables in the spreadsheet.  I tried the nocenter option in the SAS code, but that didn't help.

 

The screen shots below show that the text for the weight variable is easy to read, but the text for momage and for momwtgain are in the cell, but you cannot read the full text  unless you put your cursor in that cell.  

 

For tagsets.ExcelXP, I tried adding merge_titles_footnotes='yes' and title_footnote_width='8' as options, but still didn't get the lines for weight, momage, or momwtgain.  

 

I'd suggest emailing your question to ods@sas.com.  

 

PROC TTEST output for weight variable has text indicating variable name and label.jpg

 

Second variable in PROC TTEST output has variable name and label in ODS EXCEL.jpg

 

Third variable in PROC TTEST output has variable name and label text.jpg

Ask a Question
Discussion stats
  • 3 replies
  • 173 views
  • 2 likes
  • 3 in conversation